Last Updated: July 20, 2016
·
398
· k8mil

iOS local notification

If you want to show local notification immediately, instead of doing this:
[notification setFireDate:[NSDate dateWithTimeIntervalSinceNow:0]]; [notification setTimeZone:[NSTimeZone defaultTimeZone]];
and :
[[UIApplication sharedApplication] scheduleLocalNotification:notification];
you can call:
[[UIApplication sharedApplication] presentLocalNotificationNow:notification];
Then you don't have to set FireDate and TimeZone properties in your UILocalNotification object