简体   繁体   English

触摸屏幕区域可关闭视图控制器

[英]Touching an area of screen dismisses view controller

I've never seen a problem like this until now. 到目前为止,我从未见过这样的问题。 When I first updated my app, this problem did not exist. 当我第一次更新我的应用程序时,这个问题不存在。 It was fine. 很好 Since then there've been a couple of iOS updates, so it's possible this is where the problem began. 从那时起,已经进行了两次iOS更新,因此这可能是问题开始的地方。

I basically have a few view controllers that proceed like a wizard from one step to the next, by either clicking back/cancel button or the next button. 我基本上有几个视图控制器,它们可以通过单击后退/取消按钮或下一个按钮从一个步骤进行到另一个步骤。

There's a textView covering the main area. 有一个textView覆盖主要区域。

Normally by touching inside the textView it would begin editing. 通常,通过触摸textView内部它将开始编辑。

On this viewcontroller it's fine, that works. 在这个视图控制器上,可以正常工作。 No problem. 没问题。

在此处输入图片说明

On this viewcontroller and every subsequent view controller including tableviews with options to select, if you touch anywhere underneath the cancel and next buttons inside the view controller, it dismisses the view controller and goes back to the previous screen. 在此ViewController以及每个后续的View Controller(包括带有选择选项的表格视图)上,如果触摸View Controller内部的Cancel和Next按钮下方的任何位置,它将关闭该View Controller并返回上一屏幕。 There doesn't appear to be anything executed in my code when this happens. 发生这种情况时,我的代码中似乎没有执行任何操作。 It just dismisses the view controller as if one pressed the back button. 它只是关闭视图控制器,就好像按下了返回按钮一样。 I know the back button code is not being executed because I printed a line in there. 我知道后退按钮代码没有执行,因为我在那儿打印了一行。

在此处输入图片说明

The next view controller is a tableView and does not have a textView. 下一个视图控制器是tableView,并且没有textView。 It's got nothing to do with the textView. 它与textView无关。 It just dismisses if I touch anywhere on the screen other than the next or cancel buttons. 如果我触摸屏幕上除“下一步”或“取消”按钮以外的其他任何地方,它只是关闭。 The next views are the exact same way. 接下来的视图是完全相同的方式。 It's like a big invisible button is in the way of the screen blocking any interaction with the top half. 这就像一个大的不可见按钮阻碍了屏幕与上半部分的互动。

What's going on here? 这里发生了什么? How do I fix this? 我该如何解决? It has never done this before and I didn't change anything. 它以前从未做到过,而且我没有做任何更改。

Turns out that this was caused by using page curl transitions. 原来这是由于使用页面卷曲过渡引起的。 I changed it to flip horizontal and it works now. 我将其更改为水平翻转,现在可以使用了。 Page curl transitions are obviously bugged currently. 当前,页面卷曲过渡显然已出错。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 UIDocumentMenuViewController取消呈现视图控制器 - UIDocumentMenuViewController dismisses presenting view controller dismissModalViewControllerAnimated也关闭调用它的视图控制器 - dismissModalViewControllerAnimated also dismisses the view controller that calls it 解除 UIImagePickerController 也解除呈现视图控制器 - Dismissing of UIImagePickerController dismisses presenting view controller also 触摸时显示视图控制器 - Present view controller while touching iOS 11双击图像会关闭UIImagePickerController和演示者视图控制器 - iOS 11 double tap on image dismisses UIImagePickerController and presenter view controller 弹出视图控制器在 Xcode 11.2.1 中打开后立即关闭 - popup view controller dismisses immediately after open in Xcode 11.2.1 WKWebView 操作表在被解散后解散呈现视图控制器 - WKWebView action sheet dismisses the presenting view controller after being dismissed 如何通过触摸 UIView 来继续查看 controller? - How to segue to a view controller by touching a UIView? UIImagePickerController takePicture取消控制器 - UIImagePickerController takePicture Dismisses Controller 如何在Swift中触摸和拖动视图中选择区域? - How to select an area in a view just touching and dragging in Swift?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM