我正在尝试修改 NSUserNotifictation 以传递自定义变量:
@interface MyUserNotification: NSUserNotification
@property (nonatomic) int theid;
@property (nonatomic) NSString* url;
@end
@implementation MyUserNotification
@end
然后在我的AppDelegate
对象中启动时:
MyUserNotification *notification = [[MyUserNotification alloc] init];
notification.theid = theid;
设置theid
抛出错误:
-[_NSConcreteUserNotification setTheid:]: unrecognized selector sent to instance 0x100204840
为什么NSConcreteUserNotification
对象会卷入其中?