我正在開發一個項目,在該項目中我想在啓動時旋轉iPad。我已經爲它編碼了,但它仍然無法工作。代碼我已經在.m文件須寫上在啓動時旋轉模擬器
-(void)viewWillAppear:(BOOL)animated
{
[[UIDevice currentDevice]setOrientation:UIInterfaceOrientationLandscapeRight];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation = UIInterfaceOrientationLandscapeRight);
}