我使用addObserver API接收通知:
NSNotificationCenter.defaultCenter().addObserver(self,selector: "methodOFReceivedNotication:",name:"NotificationIdentifier",object: nil)
我的方法是:
func methodOFReceivedNotication(notification: NSNotification){ //Action take on Notification }
是的,它的作品!
但是当我将方法methodOFReceivedNotication更改为private时:
private func methodOFReceivedNotication(notification: NSNotification){ //Action take on Notification }
xCode向我发送错误:无法识别的选择器发送到实例