iPhone:定位问题
问题描述:
我从互联网上获得了一个示例应用程序。我试图改变它的方向。iPhone:定位问题
对于改变方向我有以下的编码写:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
而且也是厦门国际银行的自动调整大小的更改。
但仍然没有工作。我该怎么办 ?
答
这应该工作,但是如果你正在编写一个使用TabBarController的应用程序,你必须确保所有的viewcontrollers都从这个方法返回YES
(对于某些方向来说可能是YES)。
答
添加UISupportedInterfaceOrientations在您的info.plist和内添加所有四个方向像UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight并启用所有四个。
+0
这些仅在启动应用程序时使用。一旦您进入应用程序,它们不会影响行为。 – 2011-05-31 11:37:11
发布更多详情,你遇到什么问题? – Rams 2011-05-31 11:11:44
如果应用程序使用tabbar,需要更多的细节需要关于你的应用程序,然后在所有控制器中做是的 – 2011-05-31 11:20:08