Ahmed Hossny
Ahmed Hossny

Reputation: 272

How can I customize UILocalNotification? XCode iPhone

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;

-(AHNotification*) init{
    [super init];
    return self;
}

@end

Upvotes: 0

Views: 527

Answers (1)

Elliot
Elliot

Reputation: 6136

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.

Upvotes: 1

Related Questions