如何在iphone应用程序中将视图更改为水平视图
如何将视图更改为水平视图。我不希望它在iphone侧转时切换,我希望它永远保持水平。谢谢 注意:stackoverflow()上已经有几个与“景观”相关的问题/答案。但是为了直接回答你的问题,这里有一个苹果公司关于这个主题的高级总结:如何在iphone应用程序中将视图更改为水平视图,iphone,Iphone,如何将视图更改为水平视图。我不希望它在iphone侧转时切换,我希望它永远保持水平。谢谢 注意:stackoverflow()上已经有几个与“景观”相关的问题/答案。但是为了直接回答你的问题,这里有一个苹果公司关于这个主题的高级总结: 使用字符串值UIInterfaceOrientationAndscapeRight(或UIInterfaceOrientationAndscapeLeft)将UIInterfaceOrientation添加到Info.plist。完成相同任务的另一个选项是在启动时
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
-(BOOL)应该自动旋转指针面定向:(ui接口定向)接口定向{
返回(interfaceOrientation==UIInterfaceOrientationAndscapeRight);
}