UIView 不处理触摸

发布于 2024-09-01 12:37:16 字数 187 浏览 5 评论 0原文

我已将状态栏设置为隐藏在我的应用程序中。 [应用程序 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

轻许诺言 2024-09-08 12:37:16

检查视图上的 isUserInteractionEnabled。某些视图(例如 UIImageView)默认禁用该功能。

Check isUserInteractionEnabled on the view. Some views, like UIImageView, disable that by default.

遥远的绿洲 2024-09-08 12:37:16

检查是否有子视图阻挡它

check if there is a sub-view blocking it

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文