屏幕方向像iphone中的肖像和风景

时间:2011-03-01 09:21:38

标签: iphone

我是iphone开发的新手。在这里,我想在iPhone中查看像风景porgrammaticaly的屏幕。我完成了像肖像方面现在,当我左右两侧自动添加一些图像和pickerview数据这些也显示像肖像和风景屏幕到iPhone。

任何人都可以帮助我了解如何在iphone中定位屏幕程序

提前谢谢。

1 个答案:

答案 0 :(得分:1)

在班上使用此方法。

  • (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { //为支持的方向返回YES

    return(interfaceOrientation == UIInterfaceOrientationLandscapeRight ||
    interfaceOrientation == UIInterfaceOrientationLandscapeLeft);

}

相关问题