Ios 仅检测从右向左的旋转手势

Ios 仅检测从右向左的旋转手势,ios,rotation,gesture,right-to-left,Ios,Rotation,Gesture,Right To Left,我能够检测到旋转手势,但我只需要从右向左检测 我真的很感激任何帮助 谢谢 我假设您正在使用UIRotationGestureRecognitor检测旋转。你应该有这样的东西: UIRotationGestureRecognizer *gestureRecognizer = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(gestureRecognizerAction:)]; [self.view

我能够检测到旋转手势,但我只需要从右向左检测

我真的很感激任何帮助


谢谢

我假设您正在使用UIRotationGestureRecognitor检测旋转。你应该有这样的东西:

UIRotationGestureRecognizer *gestureRecognizer = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(gestureRecognizerAction:)];
[self.view addGestureRecognizer:gestureRecognizer];
以及:


这样,您将只能检测从右到左的旋转。

我假设您使用UIRotationGestureRecognitor来检测旋转。你应该有这样的东西:

UIRotationGestureRecognizer *gestureRecognizer = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(gestureRecognizerAction:)];
[self.view addGestureRecognizer:gestureRecognizer];
以及:


这样,您将只能检测从右向左的旋转。

您是指通过物理旋转设备触发的加速计事件吗?或者你指的是某种触摸手势,即在屏幕上旋转某物?这两个问题都在本文中讨论。如果您在阅读该指南后需要更多帮助,请明确说明您的“旋转手势”是什么意思。我指的是触摸手势。感谢您的回复。您是指通过物理旋转设备触发的加速计事件吗?或者你指的是某种触摸手势,即在屏幕上旋转某物?这两个问题都在本文中讨论。如果您在阅读该指南后需要更多帮助,请明确说明您的“旋转手势”是什么意思。我指的是触摸手势。谢谢你的回复。谢谢拉法!我错过了手势识别器对象的旋转方法。谢谢Rafal!我缺少GestureRecognitor对象的旋转方法。