我的方向设置为横向,iphone 模拟器加载并以横向模式启动我的应用程序。从 ios6 开始,上面的代码以纵向模式而不是横向模式加载图片。请指教。
编辑:问题从这里开始:
- (void)viewDidLoad {
[super viewDidLoad];
[self.view setBackgroundColor:[[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"480x320-background.png"]]];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)anInterfaceOrientation{
return anInterfaceOrientation==UIInterfaceOrientationLandscapeLeft || anInterfaceOrientation==UIInterfaceOrientationLandscapeRight;
}