扩展UILocalNotification
我是iOS的初学者。 我尝试扩展UILocalNotification。 我的课下面。
@interface FSCustomNatification : UILocalNotification typedef enum { FSCustomNatificationPay, FSCustomNatificationWrite, FSCustomNatificationSend } NotificationTypeT; @property (nonatomic, assign) NotificationTypeT typeNotificationT; @end #import "FSCustomNatification.h" @implementation FSCustomNatification @end
当我设置typeNotificationT属性,我得到 – [UIConcreteLocalNotification setTypeNotificationT:]:无法识别的select发送到实例0x8144780。 为什么?
FSCustomNatification* localNotification = [[FSCustomNatification alloc] init]; localNotification.typeNotificationT = FSCustomNatificationWrite;
通过错误消息的外观, UILocalNotification
是类集群的一部分。 文档没有说(我可以很快看到),但你不应该UILocalNotification
。
相反,您应该使用UILocalNotification
提供的userInfo
来添加任何额外的信息,当通知触发时您想要可用。