I use the addObserver
API to receive notification:
NSNotificationCenter.defaultCenter().addObserver(self, selector: \"methodOFReceivedNotication:\",
Just mark it with the dynamic
modifier or use the @objc
attribute in your method declaration
dynamic private func methodOFReceivedNotication(notification: NSNotification){
//Action take on Notification
}
or
@objc private func methodOFReceivedNotication(notification: NSNotification){
//Action take on Notification
}