全,
当我旋转我的iPhone时,我的应用程序定位到景观,即使我没有指定任何地方的“景观”。对如何进行故障排除/修复有什么建议吗?
谢谢
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<string>UIInterfaceOrientationPortrait</string>
</plist>发布于 2012-01-31 10:19:04
我会先尝试在你的视图控制器中设置它。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}有时,如果需要,您可以使用下面这样的行来强制
[[UIDevice currentDevice] setOrientation:UIDeviceOrientationPortrait];plist看起来也像这样:
<key>UIInterfaceOrientation</key>
<string>UIInterfaceOrientationPortrait</string>https://stackoverflow.com/questions/9071819
复制相似问题