Is there a way to find out if an object is already an observer for a notification type?
Currently, every addObserver call addObserver paired with removeObserver to avoid duplicate observers, but is there a way to see if the object is already an observer before addObserver ?
NSNotificationCenter.defaultCenter().removeObserver(self, name: CustomEvent, object: foo) NSNotificationCenter.defaultCenter().addObserver(self, selector: #("test"), name: CustomEvent, object: foo)
source share