gpt4 book ai didi

iphone - 单个旋转手势事件不起作用?

转载 作者:行者123 更新时间:2023-12-03 19:14:47 25 4
gpt4 key购买 nike

我正在使用以下代码

recognizer = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(handleRotationFrom:)];
[self.view addGestureRecognizer:recognizer];
[recognizer release];

但是当我做单指旋转事件时。函数handleRotationFrom没有被调用?有什么帮助吗?我也在我的 UIView 中添加了委托(delegate)方法。有什么帮助吗?

最佳答案

旋转手势始终涉及两次触摸。如果你想在 iPhone 模拟器中测试它,请按住 option 键并单击。

关于iphone - 单个旋转手势事件不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4553585/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com