UILocalNotification Extension

I am starting on iOS. I am trying to extend UILocalNotification. My class is lower.

@interface FSCustomNatification : UILocalNotification typedef enum { FSCustomNatificationPay, FSCustomNatificationWrite, FSCustomNatificationSend } NotificationTypeT; @property (nonatomic, assign) NotificationTypeT typeNotificationT; @end #import "FSCustomNatification.h" @implementation FSCustomNatification @end 

When I set the typeNotificationT property, I get - [UIConcreteLocalNotification setTypeNotificationT:]: unrecognized selector sent to instance 0x8144780. Why?

 FSCustomNatification* localNotification = [[FSCustomNatification alloc] init]; localNotification.typeNotificationT = FSCustomNatificationWrite; 
+4
source share
1 answer

The appearance of your UILocalNotification error UILocalNotification is part of a class cluster. The docs don't say (which I can see quickly), but it is unlikely that you should subclass UILocalNotification .

Instead, you should use the userInfo provided by UILocalNotification to add any additional information that you want to receive when the notification fires.

+6
source

Source: https://habr.com/ru/post/1497836/


All Articles