Instance MethodFoundationEssentials
removeObserver(_:)
iOS 26.0+
iPadOS 26.0+
Mac Catalyst 26.0+
macOS 26.0+
tvOS 26.0+
visionOS 26.0+
watchOS 26.0+
Stops the observation represented by the given observation token.
func removeObserver(_ token: NotificationCenter.ObservationToken)
Parameters
tokenA unique token representing a specific observer in a specific notification center. You receive this type from prior calls to
addObserver(of:for:using:).