Clickable Link in UIAlertView

核能气质少年 提交于 2019-12-07 08:54:00

问题


is it somehow possible to add a clickable link to the alert-message of an UIAlertView? Especially in case of a Push-Notification?

The only solution i see, is to add the link as dictionary-item to the push alert message. If the message arrive with the link and the app is opened hereupon, i can check wheter there is a link in the dictionary and open a webview.


回答1:


While adding customizations to a UIAlertView is strongly discouraged by Apple, the only way you have is to extend the UIAlertView class itself, adding the link as a subview, handling it later in the appropriate way.

Since this is not the right approach, you should consider changing the way the user interacts with the interface.



来源:https://stackoverflow.com/questions/5949927/clickable-link-in-uialertview

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