【发布时间】:2011-12-27 01:03:06
【问题描述】:
我是 iPhone 开发人员的新手,我在 Iphone 中有一个登录屏幕,当我运行时,它仅显示为半屏,然后我更改了它以横向模式显示登录屏幕的方向,但我想要在启动应用程序时它以纵向模式以横向模式显示,并且导航到另一个屏幕也以纵向模式以横向模式显示,如何?请任何人帮助我
- (BOOL)shouldAutorotateToInterfaceOrientation:()
{
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
if (orientation == UIDeviceOrientationLandscapeLeft ||
orientation == UIDeviceOrientationLandscapeRight )
{
return YES;
}
else if (orientation == UIDeviceOrientationPortrait ||orientation == UIDeviceOrientationPortraitUpsideDown)
{
return NO;
}
}
使用这些代码在纵向模式下无法在横向模式下工作,但我改变了它的工作方向。
【问题讨论】:
-
嗨,我的问题是如何以纵向启动横向视图?感谢您的回复。
标签: iphone