按下 UIView 后面的按钮
我有一个按钮,按钮的一半被 UIView 覆盖(用于样式设计)。
我想知道是否有任何方法可以使这个 UIView “触摸透明”,所以如果你按下它,它可以让你选择它后面的图像?
或者我只需要把它变成一个按钮就可以了?
谢谢
汤姆
I have a button and half of the button is covered by a UIView (for styling).
I was wondering if there was any way to make this UIView "touch transparent" as it were, so if you press on it it lets you select the image behind it?
Or will I just have to make it a button itself?
Thanks
Tom
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该将 UIView 的 userInteractionEnabled 属性设置为 NO。
You should set the UIView's userInteractionEnabled property to NO.
尝试使 UIView 不透明为 NO
try to make the UIView opaque to NO