UIView 不处理触摸
我已将状态栏设置为隐藏在我的应用程序中。 [应用程序 setStatusBarHidden:YES];
我在窗口上添加了一个 UIView 作为子视图,位于 0,0,320,40。但我无法触及我的视图?
但如果我改变“Y”位置,如 0,30,320,40,它工作正常。
问题是什么 ???
谢谢
I have set my status bar hidden in my Application.
[application setStatusBarHidden:YES];
I have added an UIView on the window as a subview at 0,0,320,40. But I am not able to get touches on my View ?
But if i am changing the 'Y' position like 0,30,320,40 its working fine.
What is the problem ???
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查视图上的
isUserInteractionEnabled
。某些视图(例如UIImageView
)默认禁用该功能。Check
isUserInteractionEnabled
on the view. Some views, likeUIImageView
, disable that by default.检查是否有子视图阻挡它
check if there is a sub-view blocking it