如果多个手势视图重叠,如何将 UIGestureRecognizer 放在前面
我有两个附加了点击手势识别器的视图。第一个视图接受触摸,而第二个视图则隐藏。一段时间后,我使第二个(带有附加手势)视图可见。问题是,尽管第二个视图在前面,但仍然只处理第一个视图的触摸:(
I have two views that have tap gesture recognizers attached. The first view accepts touches while the second one is hidden. After some time, I'm making the second (with attached gesture) view visible. The problem is that, still, only the touches of the first view are handled, despite the second view is in front :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
抱歉,忘记添加“启用用户交互”。我正在使用界面生成器绘制我的视图和其他内容,因此我错过了:)
Sorry, forgot to put "user interaction enabled". I'm drawing my views and other stuff with interface builder, therefore I have missed that :)