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?
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
虽然 Apple 强烈反对向
UIAlertView
添加自定义项,但唯一的方法是扩展UIAlertView
类本身,将链接添加为子视图,稍后再处理它适当的方式。由于这不是正确的方法,因此您应该考虑更改用户与界面交互的方式。
While adding customizations to a
UIAlertView
is strongly discouraged by Apple, the only way you have is to extend theUIAlertView
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.