tabbarcontroller를 사용하여 shouldAutorotateToInterfaceOrientation : 다른 세 방향의 호출을 완벽하게 호출하는 동안 세로 모드를 호출하지 않는 메서드입니다. 어떤 생각이 들었습니까?tabbarcontroller의 세로 모드 방향 문제가 있습니까?
감사합니다.
tabbarcontroller를 사용하여 shouldAutorotateToInterfaceOrientation : 다른 세 방향의 호출을 완벽하게 호출하는 동안 세로 모드를 호출하지 않는 메서드입니다. 어떤 생각이 들었습니까?tabbarcontroller의 세로 모드 방향 문제가 있습니까?
감사합니다.
심지어 장치의 방향이 변경되었거나 shouldAutorotateToInterfaceOrientation 대신 알림을 사용하는지 여부를 알고 싶다면 문제가 발생합니다. 당신이 shouldAutorotateToInterfaceOrientation 방법에는 반환하면 기본 shouldAutorotateToInterfaceOrientation UIDeviceOrientationPortrait에 대한 반환 YES으로 원래 문제에 대한
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) name:UIDeviceOrientationDidChangeNotification object:nil];
-(void)orientationChanged:(NSNotification *)dict
{
UIInterfaceOrientation interfaceOrientation = (UIInterfaceOrientation)[UIDevice currentDevice].orientation;
//Your code
}
, 장치는 생각하지 않습니다 자사의 에서 UIDeviceOrientationPortrait 모드에서만 따라서 방법 shouldAutorotateToInterfaceOrientationUIDeviceOrientationPortrait에 대해 호출되지 않습니다.
(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
//your code
return NO;
}
shouldAutorotateToInterfaceOrientation 메서드에서 항상 NO를 반환합니까? –
Device and Simulator를 사용해 보셨습니까? app_name-Info.plist에서 지원되는 방향을 확인 했습니까?
나는 둘 다 시험해 본다. 같은 결과. .plist에서 나는 아무것도 바꾸지 않거나 어떤 것을 제한하고 있지 않습니까? –
이상한 점은 PList 파일에 "지원되는 인터페이스 방향"키가 없다는 것입니까? – Greensource
오리 엔테이션과 관련된 담금질. –
정보가 충분하지 않습니다. 이 경우 코드를 게시해야합니다. –