【发布时间】:2016-12-21 14:12:12
【问题描述】:
我正在尝试修改 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 对象为何参与其中?
【问题讨论】:
标签: objective-c macos cocoa nsusernotification