Can I show a custom local notification view or a custom alert when the application is in the background?

Actually, I want to show a local notification in my application. But I want to show this notification with some kind of custom design, for example, ok and the cancel button on it, as well as the image. Alert view may also work, but I'm not sure if I can show it when the application is in the background. Try some solution.

Thanks in advance.

+4
source share
1 answer

You cannot change the view Local Notificationwhen it starts and when your application is in the background, until iOS 7. Maybe in iOS 8, you can do it.

Also, if you want to use UIAlertViewNotifications to display, you can only show it when the application is in the foreground.

You must use this function in the file AppDelegate.mto be notified when the application is in the foreground.

-(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
+1
source

Source: https://habr.com/ru/post/1548431/


All Articles