2012-06-15 68 views
3

我正在製作基於視圖的應用程序。對於其中一個xib文件,我希望它只能以橫向模式顯示。當我點擊第一頁中的按鈕時,它應該自動旋轉到橫向並導航到應該處於橫向方向的新屏幕。我如何導航屏幕到橫向?

我該怎麼做?

回答

0

在,應該在橫向視圖,補充一點:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight); 
}