Rudra
Rudra

Reputation: 241

How to show UIAlertView for local notification instead of the label-notification which appear at top of the screen in ios7 ?

because I think beyond iOS5 they remove UIAlertView instead of one label appear at the top of screen which I don't want,I am using this code but it doesn't trigger alertview, i need old look of localnotification.

UILocalNotification* localNotification = [[UILocalNotification alloc] init];
localNotification.fireDate = pickerDate;
localNotification.alertBody = self.itemText.text;
localNotification.alertAction = @"Show me the item";
localNotification.timeZone = [NSTimeZone defaultTimeZone];
localNotification.applicationIconBadgeNumber = [[UIApplication sharedApplication] applicationIconBadgeNumber]  [[UIApplication sharedApplication] scheduleLocalNotification:localNotification];

please Help, Thanks in Advance!

Upvotes: 1

Views: 823

Answers (2)

RAJA
RAJA

Reputation: 1214

The notification alert style cannot be changed in our application programmatically. This alert styles shown based on the user wish. If you see in iPhone settings-> notification center, you may see all the applications registered for notifications. The user can change the alert style for each application based on their wish. This is not in our hand.

Upvotes: 3

Léo Natan
Léo Natan

Reputation: 57050

This is not up to the control of the app or the developer (using public API). The user can decide if and how to receive notifications from your app. You may suggest you your user on first launch/tutorial/help that for best experience, you may want to enable alerts instead of banners and perhaps display visual cues on how to do it.

Upvotes: 1

Related Questions