Nits007ak
Nits007ak

Reputation: 753

Can I show a custom Local notification View or an Custom Alert view when app is in Background?

Actually I want to show a local notification in my app. But i want to show this notification with some custom design like ok and cancel button on it and image also. Alert view also can work but i am not sure if i can show it when app is in background Please suggest some solution.

Thanks In advance.

Upvotes: 4

Views: 861

Answers (1)

Yogesh Suthar
Yogesh Suthar

Reputation: 30488

You can't change the view of Local Notification when it fires and when your app is in background, till in iOS 7. May be in iOS 8 you can do this.

Also if you want to use the UIAlertView to show the Notification, you can only show it when the app is in foreground.

You have to use this function in AppDelegate.m file to get the notification when app is in foreground.

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

Upvotes: 1

Related Questions