使UIView通过触摸事件? [英] Make UIView pass through touch events?

查看:98
本文介绍了使UIView通过触摸事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让UIView无响应,并通过所有触摸事件?基本上我只是想在其他UIView的顶部显示图形,而不阻塞触摸事件。

Is there a way to make a UIView unresponsive AND pass through all touch events? Basically I just want to display graphics on top of other UIViews without blocking touch events.

推荐答案

发送到您的视图的事件会

The event sent to your view will go through the responder chain, if it doesn't implement any event handling method.

您还可以设置 userInteractionEnabled 属性为 NO

这篇关于使UIView通过触摸事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆