I use the addObserver
API to receive notification:
NSNotificationCenter.defaultCenter().addObserver(self, selector: \"methodOFReceivedNotication:\",
Have you considered using -addObserverForName:object:queue:usingBlock:
?
NSNotificationCenter.defaultCenter().addObserverForName("NotificationIdentifier", object: nil, queue: nil, usingBlock: {
[unowned self] note in
self.methodOFReceivedNotication(note)
})
or instead of calling the private method, just performing the action.
NSNotificationCenter.defaultCenter().addObserverForName("NotificationIdentifier", object: nil, queue: nil, usingBlock: {
[unowned self] note in
// Action take on Notification
})