Я начинаю в iOS. Я пытаюсь расширить UILocalNotification. Мой класс ниже.Расширение 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]: непризнанные селектор направил к экземпляру 0x8144780. Зачем?
FSCustomNatification* localNotification = [[FSCustomNatification alloc] init];
localNotification.typeNotificationT = FSCustomNatificationWrite;
Вы пробовали переопределить 'init'? Похоже, он считает, что 'localNotification' является' UIConcreteLocalNotification', а не 'FSCustomNatification'. Кроме того, вместо имени o в имени вашего класса вместо a. – thegrinner
Да, я попробовал overrite init. – fisher3421