试图将通知观察者添加到自定义类(基类是NSObject)中。
override init() {
super.init()
NotificationCenter.default.addObserver(self, selector: #selector(self.methodOfReceivedNotification(notification:)), name: Notification.Name("RegistrationCAll"), object: nil)
}
无法接收事件。是否可以将观察者添加到nsobject自定义类?