In Appdelegate.swift,
func application(application: UIApplication, didReceiveLocalNotification notification: UILocalNotification) {
NSNotificationCenter.defaultCenter().postNotificationName("notification", object: nil, **userInfo: notification.userInfo**)
}
In ViewController.swift
I included observer and method
override func viewDidLoad() {
super.viewDidLoad()
NSNotificationCenter.defaultCenter().addObserver(self, selector:"handleNotification", name: "notification", object: nil)
}
func handleNotification(notification: NSNotification){
print("enter ")
}
When i handle notification, it crashes "unrecognised selector sent to instance" what is problem?