0
這一個讓我把我的頭髮撕掉。我的iPad應用的設置如下:UIView始終以縱向模式加載
在我的應用程序委託我有這樣的:
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
在我的info.plist
我:
Initial Interface Orientation = UIInterfaceOrientationLandscapeLeft
在我的第一個視圖控制器被加載從應用程序的委託,我有:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations.
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
在我的第二個視圖控制器我有:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations.
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
最後,在界面構建器中將兩個筆尖中的視圖設置爲橫向。應用程序開始在橫向模式下,有一個按鈕,按下時第二視圖分配給第一個觀點:
self.view = secondView.view;
的問題是,即使一切都在景觀新視圖總是加載在縱向模式?請任何幫助,這將非常非常感激!
感謝回覆。你的屏幕截圖是xCode 4,你知道它在xCode 3中的位置嗎? – Peter
@Peter - 查看Info.plist中的'Supported interface orientations'鍵。 – Abizern
@Peter,它是Xcode,而不是xCode。 :-) – Moshe