禁用/更改“从左侧滑动”的行为在具有主/详细配置的iPad上 [英] Disable/alter behavior of "swipe from left" on iPad with master/detail configuration

查看:248
本文介绍了禁用/更改“从左侧滑动”的行为在具有主/详细配置的iPad上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的iPad应用程序中有一个主/细节分割视图配置。如果我从左侧滑动(或者真的,只需在详细视图中向滑动,无论我是否从屏幕的左边缘开始),它都会滑动打开主视图。 / p>

这里的问题是我的详细视图是 MKMapView ,所以如果我把手指放在地图上并移动我的手指向右(向左平移)主视图打开!我必须开始在其他方向上拖动我的手指,然后向右移动,以正确平移。



是否可以更改此行为:


  1. 因此它被完全禁用(仅允许从后退按钮打开主视图)


  2. 所以它只影响详情视图中在地图上的滑动


  3. 因此只有在滑动从屏幕边缘开始时才触发


谢谢!

解决方案

是的,您可以禁用该行为。设置 presentsWithGesture 属性为以禁用滑动手势。


I have a master/detail split view configuration in my iPad application. If I swipe from the left (or really, just swipe to the right in the detail view, regardless of whether I start at the left edge of the screen or not) it slides open the master view.

The issue here is that my detail view is an MKMapView, so if I put my finger on the map and move my finger to the right (to pan left) the master view opens! I have to start dragging my finger in some other direction, and then go right, to properly pan.

Can this behavior be altered either:

  1. So it is disabled completely (only allowing opening the master view from the back button)

  2. So it only affects swipes in the detail view that are not over the map

  3. So it only triggers if the swipe starts from the edge of the screen

Thanks!

解决方案

Yes, you can disable that behavior. Set the presentsWithGesture property of the split view controller to NO to disable the swiping gesture.

这篇关于禁用/更改“从左侧滑动”的行为在具有主/详细配置的iPad上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆