开发者

How to display only one button on UILocalNotification

I have implemented UILocalNotificati开发者_StackOverflow社区on. Everything is working fine and i can see the Notification also. I can see the notification and it shows me two button "cancel" and "View" from which i do not want "view" button can i do this?

How to do this?


Hi sorry for late reply you can Have only Ok button for UilocalNotifications by doing this

notif.hasAction=NO;

by doing this you cannot see view button in the notifications Hope it solved your Problem


No. you can not do this. because local notification generated from ios u only change the name of view button by alertAction property.


i think its not possible to show one button in nslocal notification

 notification.alertAction = NSLocalizedString(@"hello", nil); // its set instead of view to hello.
 notification.alertAction = NSLocalizedString(nil, nil); // default view Name is coming For action Button to application
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜