Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift 使用iOS 13 modalPresentationStyleAutomatic拖放图像_Swift_Iphone_Drag And Drop_Ios13_Uimodalpresentationstyle - Fatal编程技术网

Swift 使用iOS 13 modalPresentationStyleAutomatic拖放图像

Swift 使用iOS 13 modalPresentationStyleAutomatic拖放图像,swift,iphone,drag-and-drop,ios13,uimodalpresentationstyle,Swift,Iphone,Drag And Drop,Ios13,Uimodalpresentationstyle,我在使用新的演示样式自动拖放图像时遇到问题 这些图像是UIImageView的子类 覆盖func触摸开始、触摸移动和触摸结束。我还尝试将self.superview?.isUserInteractionEnabled=false置于触摸屏内部,开始禁用对视图的触摸 如果我设置了segue.destination.modalPresentationStyle=.fullScreen,它会工作,但我希望自动样式也有相同的行为 正常行为: 有什么想法吗?这是一场冲突。即使您禁用关闭“不完全全屏”模

我在使用新的演示样式自动拖放图像时遇到问题

这些图像是UIImageView的子类 覆盖func触摸开始、触摸移动和触摸结束。我还尝试将
self.superview?.isUserInteractionEnabled=false
置于触摸屏内部,开始禁用对视图的触摸

如果我设置了
segue.destination.modalPresentationStyle=.fullScreen
,它会工作,但我希望自动样式也有相同的行为

正常行为:


有什么想法吗?

这是一场冲突。即使您禁用关闭“不完全全屏”模式的功能,当屏幕向下移动时尝试拖动仍然是一种糟糕的用户体验。全屏显示是我所知道的唯一选择。或者更改用户界面,使拖动是水平的。@要禁用此功能,请将
isModalInPresentation
设置为
true
。但是,我同意这不是最好的解决方法。如果您设置一个委托并实现
PresentationControllers应该解散(:)
以返回
false
,会发生什么?而且您所做的不是真的拖放。。。你可以试试看。@matt PresentationControllerShouldDismission(:)不起作用。。。