1,support files --------->Rotation-Info.plist--------->supported interface orientations--------->修改Item0的值 (Item0的值就是默认启动模拟器时的方向),这样设置后,在其后的所有的界面中默认的模拟器方向就是这个Item0的值了。
2,在其后的界面中可以通过如下代码修改模拟器的方向:
方法1>
[[UIDevicecurrentDevice] performSelector:@selector(setOrientation:)withObject:(id)UIInterfaceOrientationPortrait];
方法2>
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait animated:NO];
本人新手,对这个ios也不了解,有什么不对的地方,欢迎各位大神指出来。