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
Written by k8mil
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ios
Authors
Related Tags
#ios
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#