Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to pop up local notifications while the iphone app is on screen?

I need a local notification for an iphone app to pop up while the app is active. Is this possible? If so how?

like image 577
user1248171 Avatar asked Mar 04 '12 14:03

user1248171


1 Answers

- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification

is called if you have a notification scheduled and the app is already running..it is a UIApplication delegate method..

here you can do your custom code..by accessing the notification...

edit :

if you want to present a notification right now .. then you can just set the notification fire date to past...it will be fired..then you can create a alert view in the above given UIapplication method

like image 137
Shubhank Avatar answered Nov 15 '22 22:11

Shubhank