在 iOS 上的我的 sencha-tpuch / phonegap 应用程序中,我希望我的应用程序不要改变其使用的设备的方向。我怎样才能抑制 sencha-touch 中的方向变化,或者我会完全覆盖什么?谢谢!
问问题
1067 次
2 回答
0
在你的 phonegap xcode 项目中找到文件MainViewController.m
在那里找到函数
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
并为支持的方向返回 yes。
于 2012-02-06T20:59:46.833 回答