我現在正在執行app
,因爲iOS devices
所以在objective C
,我在問如何在旋轉後保持原位置UIImageView
?保留原點位置UIImageView
例如,我用我的UIImageView
這樣的:
CGAffineTransform initialPosition = CGAffineTransformMakeRotation(0);
CGAffineTransform finalPosition = CGAffineTransformMakeRotation(M_PI/2);
[UIView beginAnimations: @"Rotate animation" context: NULL];
MySuperUIImageView.transform = initialPosition;
[UIView setAnimationDuration:1.0];
[UIView setAnimationRepeatAutoreverses:NO];
[UIView setAnimationRepeatCount:1];
[UIView setAnimationDelegate:self];
MySuperUIImageView.transform = finalPosition;
[UIView commitAnimations];
但之後,我做到了desappear一時間,使用:
MySuperUIImageView.alpha = 0.0f;
當我重新使用它,我希望它在第一個原始位置,沒有旋轉。這很容易嗎?
在此先感謝!
你是對的! – user2057209