首先在项目.plist文件中添加一个属性 Initial interface orientation,属性值设置为 Landscape (right home button)或Landscape (left home button);
然后在对应的ViewController.m中修改方法
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
//UIInterfaceOrientationPortraitUpsideDown修改为对应的UIInterfaceOrientationLandscapeRight或UIInterfaceOrientationLandscapeleft即可
return (interfaceOrientation != UIInterfaceOrientationLandscapeRight);
}