Woodstock
Woodstock

Reputation: 22926

UILocalNotifications while app is in foreground

I know similar types of question have been asked before but I'm trying to achieve a particular effect:

I understand I can listen in,

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

and handle the notification myself, however I don't just want to display a custom alert or UIAlertView,

I actually want the UILocalNotification to show as it would when the app is in the background. i.e.

Banner Notification

The reason i'd like this is, it's play a sound itself, and the banner looks pretty.

Any thoughts?

Regards, John

Upvotes: 3

Views: 2004

Answers (2)

Stavash
Stavash

Reputation: 14304

This control might help you achieve the effect you're seeking:

https://www.cocoacontrols.com/controls/mpnotificationview

Upvotes: 5

Mundi
Mundi

Reputation: 80265

Only two solutions come to mind. The first is not feasible: it would involve creating another app with a different signature and somehow have it manage the notifications. I don't even want to think this through - it seems like a bad idea.

Therefore, you just have to reengineer the notification popup. A simple view with rounded corners, animating in via rotation etc. Should be doable without too much trouble.

Upvotes: 5

Related Questions