在UIAlertView中点击链接 [英] Clickable Link in UIAlertView
问题描述
是它在某种程度上可以将一个可点击的链接添加到UIAlertView中的警告消息?
特别是在推送通知的情况下,?
is it somehow possible to add a clickable link to the alert-message of an UIAlertView? Especially in case of a Push-Notification?
我看到的唯一的解决办法,是把链接作为字典项添加到推送提醒信息。
如果该消息的链接到达,应用程序被打开于此,我可以检查wheter没有在字典中的链接,打开网页视图。
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.
推荐答案
当添加自定义一个 UIAlertView中
强烈地受到苹果气馁,你唯一的办法就是延长在 UIAlertView中
类本身添加链接作为一个子视图,以适当的方式处理后它。
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.
这篇关于在UIAlertView中点击链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!