【发布时间】:2013-02-25 13:46:27
【问题描述】:
我的自定义视图上有一些图纸,想让用户旋转它
viewContorller.m:
-(void)setMyView:(myView *)myView {
...
[self.faceView addGestureRecognizer:[[UIRotationGestureRecognizer alloc] initWithTarget:faceView action:@selector(rotate:)]];
...
}
faceView.m
- (void)rotate:(UIRotationGestureRecognizer *)gesture
{
if (gesture.state == UIGestureRecognizerStateChanged) {
self.transform = CGAffineTransformMakeRotation(gesture.rotation);
gesture.rotation = 0;
}
}
它只是不起作用,但相当震动?
【问题讨论】:
标签: ios core-animation core-graphics