0
필요 : iOS6 및 iOS5의 경우 기기를 세로에서 가로로 프로그램 방식으로 프로그래밍 할 수 있습니다.
문제 : ios6에서 [UIDevice setOrientation]
기능을 사용할 수 없습니다.ios6 및 ios5와 호환되는 기기 방향 변경
내가 무엇을 : iOS6의에 대한 코드 : iOS5를위한
- (BOOL) shouldAutorotate
{
return YES;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeLeft;
}
코드 :
-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
// [[UIDevice currentDevice] setOrientation] - I cannot use it
// ???
}