IOS notification content extension: add buttons in storyboard and handle the click action

和自甴很熟 提交于 2019-12-08 09:50:35

问题


IOS notification content extension: add buttons in MainInterface.storyboard and handle the click action without dismissing the notification


回答1:


after making some research I discover that: can not handle buttons clicks in the IOS notification content extension, only the type of button can be used is the media button, see the IOS documentation:

https://developer.apple.com/documentation/usernotificationsui/unnotificationcontentextension




回答2:


The up answer is not correct, you can just add UNNotificationExtensionUserInteractionEnabled YES to the info.plist, then you can do every thing just like a common viewController



来源:https://stackoverflow.com/questions/50575558/ios-notification-content-extension-add-buttons-in-storyboard-and-handle-the-cli

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!