how can i customize UILocalNotification
so it can take two integers variables. I tried to inherit the UILocalNotificaion
to a class but it crashes when i access one of the two integers that i have added.
@interface AHNotification : UILocalNotification {
@public
int AllIndex;
int Index;
}
@property int AllIndex;
@property int Index;
@end
@implementation AHNotification
@synthesize AllIndex,Index;
-(AHN开发者_如何学Pythonotification*) init{
[super init];
return self;
}
@end
Use the built-in userInfo property of UILocalNotification.
For example, you can store an NSDictionary of key-value pairs in it. Use NSNumber objects to represent your ints.
精彩评论