Instance Method

removeObserver(_:fromObjectsAt:forKeyPath:)

Removes anObserver from all key value observer notifications associated with the specified keyPath relative to the array’s objects at indexes.

Declaration

func removeObserver(_ observer: NSObject, fromObjectsAt indexes: IndexSet, forKeyPath keyPath: String)

Parameters

anObserver

The observer.

indexes

The index set.

keyPath

The key path, relative to the array, to be observed.

Discussion

This is not merely a convenience method; invoking this method is potentially much faster than repeatedly invoking removeObserver(_:forKeyPath:).

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software