我的文本字段有问题,我可以使用手势旋转和缩放它,但我想同时进行单指旋转和缩放。请帮助我。我真的非常需要这个。
问问题
271 次
2 回答
1
我能想到的最接近的方法不是使用手指,而是使用滑块。考虑:
scale = scaleSlider.value;
currentAngle = rotationSlider.value;
//Create a transformation with just the rotation
CGAffineTransform transform = CGAffineTransformMakeRotation(currentAngle);
//Now apply our scale
transform = CGAffineTransformScale(transform, scale, scale);
//Now set the transform on the object to the combined rotation/scale transform.
[tmp setTransform: transform];
于 2012-10-23T01:57:07.230 回答
0
要同时启用多个手势识别器,您应该添加此方法并返回 yes,我在我的项目中对其进行了测试:
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{
return YES;
}
于 2012-11-10T11:04:20.657 回答