如何通过 iTunes 链接或 Google 搜索使 UIImageView 可点击(可触摸)
我在 UIImageView 中有一些静态家庭广告,目前仅显示一些文本。我想让它们可点击,这样当用户触摸 UIImageView 时,它会打开一个 iTunes 链接或带有预定义 Google 搜索的 Safari。
这里最好的方法是什么?
谢谢你!
I have a few static household ads in an UIImageView that just display some text for now. I'd like to make them clickable, so when the user touches the UIImageView it opens an iTunes link or Safari with a predefined Google search.
What's the best approach here ?
thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

有什么原因不能使用 UIButton 吗?
您可以设置 UIButton 的图像,然后通过 IB 或代码使其可触摸。
Is there any reason that you can't use a UIButton?
You can set the image of a UIButton and then make that touchable via IB or in code.