xas3fg
Last Updated: July 20, 2016
·
142
· k8mil

iOS local notification

ios

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

Say Thanks
Respond