Post not yet marked as solved
Post marked as unsolved with 2 replies, 2,154 views
private var observation: NSKeyValueObservation?
init() {
observation = observe(
\.thumbnailsController.assets,
options: [.new],
changeHandler: { [weak self] _, change in
/// code goes here
}
})
}
deinit {
if let observation = observation {
removeObserver(observation, forKeyPath: "thumbnailsController.assets")
}
}Cannot remove an observer <_NSKeyValueObservation 0x280565e40> for the key path "thumbnailsController.assets" from because it is not registered as an observer.
(null)Removing observer crash in iOS 13 but not on iOS 12. Should I file a bug?