我有一个 UIView 子类,我在其中添加了一个 UIPanGestureRocognizer:
_panGestureRecognizer = [[UIPanGestureRecognizer alloc]
initWithTarget:self action:@selector(handlePanGesture:)];
_panGestureRecognizer.maximumNumberOfTouches = 1;
_panGestureRecognizer.delegate = self;
[self addGestureRecognizer:_panGestureRecognizer];
此视图用于包含 UISplitViewController 作为顶级视图/控制器的视图层次结构中。
在 iPad 模拟器中以横向方式对此进行测试时,如果我通过向上/向下/向左启动平移,我的handlePanGesture:
方法将按预期调用。但是,如果我通过向右启动平底锅,则不会调用我的handlePanGesture:
方法。为什么不?