使用CGAffineTransformMakeScale縮放UIView從0.1到1.0的Im。使用CGAffineTransformMakeScale縮放UIView時旋轉
問題在於縮放動畫時視圖也在旋轉。所以它以1.0和90º的旋轉比例結束。
[self presentModalViewController:slideTwoViewController animated: NO];
[slideTwoViewController.view setTransform:CGAffineTransformMakeScale(0.1,0.1)];
[UIView beginAnimations: nil context: nil];
[UIView setAnimationDuration:2.0];
[slideTwoViewController.view setTransform:CGAffineTransformMakeScale(1.0,1.0)];
[UIView commitAnimations];
最初的應用方向是橫向左右。所以當動畫結束時,UIView看起來就像肖像一樣。
這是應該發生的嗎?我錯過了什麼嗎?
感謝
是什麼樣的UIView?這是否發生在模擬器和設備上? – tidwall 2011-06-02 18:06:50
ViewController的視圖,默認的視圖。這發生在模擬器中。 – Canelo 2011-06-02 18:08:25