1
我有一些代碼,導致UIImageView
旋轉180度時,用戶觸摸圖像。不幸的是,當用戶再次觸摸它時,什麼也沒有發生。我假設已經確定圖像已經旋轉180度,這可能是它不再移動的原因。我如何解決這個問題,謝謝。只能旋轉UIImageView一次
-(void) spinSun
{
[UIView animateWithDuration:2.0f animations:^{
imgSun.transform = CGAffineTransformMakeRotation(-3.142);
} completion:^(BOOL finished) {
}];
}
imgSun.transform = CGAffineTransformRotate(imgSun.transform,-3.142); –