我正在處理照片視圖控制器,以便在縱向和橫向視圖中顯示一些照片。我所做的是用下面的代碼編輯-(BOOL)shouldAutorotateToInterfaceOrientation
方向,但在xcode中進行測試時(菜單硬件>向右旋轉),視圖不會橫向旋轉。我做了什麼不對?任何想法爲什麼這個觀點不旋轉?
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
視圖控制器是基於標籤的iPhone應用程序的一部分,這個視圖不是根視圖:這是問題嗎?
[請不要簽署您的帖子!](http://stackoverflow.com/faq#signatures) – cmbuckley