2010-07-28 35 views

回答

2

如果你繼承的UIViewController,甚至編程,你應該得到自由旋轉。只要確保在滾動視圖和圖像視圖上設置了autoresizingMask,以便如果您希望視圖適應新的屏幕尺寸,則將蒙版設置爲UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight

1

確保您已實現shouldAutorotateToInterfaceOrientation,然後做一個小

yourView.transform = CGAffineTransformIdentity; 
yourView.transform = CGAffineTransformMakeRotation(degreesToRadian(90)); 

,並使用這個在你的頭文件是非常有用的

#define degreesToRadian(x) (M_PI * (x)/180.0) 
相關問題