Touch through UIImageView?

流过昼夜 提交于 2020-01-14 07:29:05

问题


I have a transparent UIImageView with a button behind it. How can I touch "through" it and press the button underneath it?

Thanks


回答1:


Use UIImageView.userInteractionEnabled = NO;

That prevents it from receiving touches and all the touches will go through it.



来源:https://stackoverflow.com/questions/7060410/touch-through-uiimageview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!