我從互聯網上獲得了一個示例應用程序。我試圖改變它的方向。iPhone:定位問題
對於改變方向我有以下的編碼寫:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
而且也是廈門國際銀行的自動調整大小的更改。
但仍然沒有工作。我該怎麼辦 ?
我從互聯網上獲得了一個示例應用程序。我試圖改變它的方向。iPhone:定位問題
對於改變方向我有以下的編碼寫:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
而且也是廈門國際銀行的自動調整大小的更改。
但仍然沒有工作。我該怎麼辦 ?
這應該工作,但是如果你正在編寫一個使用TabBarController的應用程序,你必須確保所有的viewcontrollers都從這個方法返回YES
(對於某些方向來說可能是YES)。
添加UISupportedInterfaceOrientations在您的info.plist和內添加所有四個方向像UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight並啓用所有四個。
這些僅在啓動應用程序時使用。一旦您進入應用程序,它們不會影響行爲。 – 2011-05-31 11:37:11
發佈更多詳情,你遇到什麼問題? – Rams 2011-05-31 11:11:44
如果應用程序使用tabbar,需要更多的細節需要關於你的應用程序,然後在所有控制器中做是的 – 2011-05-31 11:20:08