我正在开发一个项目,在该项目中我想在启动时旋转iPad。我已经为它编码了,但它仍然无法工作。代码我已经在.m文件须写上在启动时旋转模拟器
-(void)viewWillAppear:(BOOL)animated
{
[[UIDevice currentDevice]setOrientation:UIInterfaceOrientationLandscapeRight];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation = UIInterfaceOrientationLandscapeRight);
}