iPhone:有没有办法在使用 UINavigationController 更改视图时跟踪触摸?
我目前正在 UINavigationController 上使用 2 个视图。
我有一个叶子视图(Tom Brow 的叶子项目)来模拟仅适用于图像的页面的卷曲效果,以及我的实际视图控制器与页面及其内容。
我想做的是,当点击某个地方时, popViewControllerAnimated:NO 实际的视图控制器,将叶子视图留在顶部并尝试翻页,而不必再次点击屏幕并保持一切好像没有发生任何切换。
我的问题是,触摸似乎穿过黑洞,永远不会到达当前视图。我什至尝试使用自定义 UIApplication 子类来捕获触摸,但是一旦弹出第一个视图,触摸就会开始出现 nil view 和 window 以及 Phase = UITouchPhaseStationary。
导航控制器中的视图被推送:一个作为 init 方法中的 rootViewController,另一个使用 PushViewController:animated:。
是否有我遗漏的东西,或者没有办法通过 UINavigationController 中的视图来保持触摸?
I'm currently working with 2 views on a UINavigationController.
I have a Leaves view (Tom Brow's leaves project) to simulate curling effect for pages which only works with images, and my actual view controller with the page and it's contents.
What I'm trying to do is, when tapped on certain place, popViewControllerAnimated:NO the actual view controller, leaving the leaves view behind on top and trying to do the page turn without having to tap again on the screen and keeping things as if no switch ever happened.
My issue here is that the touches seem to go through a black hole and never get to the current view. I've even tried to catch the touches with a custom UIApplication subclass, but as soon as the first view gets popped the touches start coming with nil view and window and phase = UITouchPhaseStationary.
The views in the navigation controller are pushed: one as the rootViewController in the init method and the other with a pushViewController:animated:.
Is there something I'm missing or there's just no way to keep touches through views in a UINavigationController?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编辑:最终解决方案,清除覆盖层以获得触摸
EDITED: Final solution, clear overlay to get touches