开发者

How to display only one button on UILocalNotification

开发者 https://www.devze.com 2023-04-05 14:18 出处:网络
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 \"V

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

精彩评论

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