我有两个像这样转换的图像视图:
- (void)handleTap:(UITapGestureRecognizer *)tapRecognize
{
if (tapRecognize == tapRecognizer)
{
CGAffineTransform transform = CGAffineTransformRotate(lineImage.transform, (M_PI / 4));
[image1 setTransform:transform];
}
if (tapRecognize == tapRecognizer2)
{
CGAffineTransform transform = CGAffineTransformRotate(lineImage2.transform, (M_PI / 4));
[image2 setTransform:transform];
}
}
我还将 tapRecognizer 添加到图像视图中。我的问题是如何重置转换,在这种情况下,按下按钮时的旋转。将其设置为原始模式。我怎样才能做到这一点?