如何通过 iTunes 链接或 Google 搜索使 UIImageView 可点击(可触摸)

发布于 12-21 15:13 字数 148 浏览 2 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦冥2024-12-28 15:13:07

有什么原因不能使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文