1
기기를 뒤집 으면 180도 회전하려는 가로 앱이 있습니다. 그러나 내 메인보기 컨트롤러에서는 shouldAutorotateToInterfaceOrientation이 전혀 호출되지 않습니다. 왜 그랬을까요?shouldAutorotateToInterfaceOrientation이 호출되지 않습니다.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
NSLog(@"ROTATE? %d", interfaceOrientation); //this never gets logged
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
편집 : 애플 대리자에서 :
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[window addSubview:topViewController.view];
[window makeKeyAndVisible];
}
창에 컨트롤러보기를 두 개 이상 추가 하시겠습니까? 여기를 참조하십시오 : http://developer.apple.com/library/ios/#qa/qa1688/_index.html (기술 Q & A QA1688 내 UIViewController가 기기와 함께 회전하지 않는 이유는 무엇입니까?) – Krumelur
번호를 편집합니다. 애플 리케이션 대리인을 보여주는 게시물. – sol
Info.plist 파일을 편집하여 두 오리 엔테이션을 모두 지원함을 보여 줍니까? – ughoavgfhw