Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- id localNotif = [[NSClassFromString(@"UILocalNotification") alloc] init];
- if (!localNotif) {
- return;
- }
- [localNotif setTimeZone:[NSTimeZone defaultTimeZone]];
- [localNotif setAlertBody:NSLocalizedString(@"Hello!",nil)];
- [localNotif setAlertAction:NSLocalizedString(@"Hello", nil)];
- [localNotif setSoundName:UILocalNotificationDefaultSoundName];
- [localNotif setFireDate:[[NSDate date] addTimeInterval:(60*60)]];
- [localNotif setFireDate:[[NSDate date] addTimeInterval:(24*60*60)]];
- [[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
- [localNotif release];
- [localNotif setTimeZone:[NSTimeZone defaultTimeZone]];
- [localNotif setAlertBody:NSLocalizedString(@"Hello!",nil)];
- [localNotif setAlertAction:NSLocalizedString(@"Hello", nil)];
- [localNotif setSoundName:UILocalNotificationDefaultSoundName];
- [localNotif setFireDate:[[NSDate date] addTimeInterval:(60*60)]];
- [localNotif setFireDate:[[NSDate date] addTimeInterval:(24*60*60)]];
- [[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
- [localNotif release];
Add Comment
Please, Sign In to add comment