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
- observer:
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:).