【发布时间】:2012-03-07 02:55:56
【问题描述】:
我在情节提要中使用导航控制器,但是当我将模拟器置于横向时,我的应用程序始终是纵向格式。为什么? =(
【问题讨论】:
标签: iphone ios5 uinavigationcontroller storyboard landscape
我在情节提要中使用导航控制器,但是当我将模拟器置于横向时,我的应用程序始终是纵向格式。为什么? =(
【问题讨论】:
标签: iphone ios5 uinavigationcontroller storyboard landscape
改变
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
到
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
还要确保在您的项目设置中将“支持的设备方向”设置为允许横向。
【讨论】: