1
내 rootViewController에서 shouldAutorotateToInterfaceOrientation
같은 것을 다시 구현했습니다. ios dev - shouldAutorotateToInterfaceOrientation 메서드가 세로 모드 용으로 호출되지 않았습니다.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
switch (toInterfaceOrientation) {
case UIInterfaceOrientationPortrait:
NSLog(@"Orientation - Portrait");
break;
case UIInterfaceOrientationLandscapeLeft:
NSLog(@"Orientation - Left");
break;
case UIInterfaceOrientationLandscapeRight:
NSLog(@"Orientation - Right");
break;
case UIInterfaceOrientationPortraitUpsideDown:
NSLog(@"Orientation - UpsideDown");
break;
default:
break;
}
return YES;
}
내 장치를 회전
,이 방법은 아닌 세로 방향으로, LandscapeRight, LandscapeLeft 및 상하 반전 호출됩니다.보기가 세로 모드이며이 메서드는 UIInterfaceOrientationPortrait와 함께 호출됩니다. 그러나 장치를 회전시킬 때이 방법은이 방향에서만 호출되지 않습니다.
모든 인터페이스를 회전시키지 않고 메인보기에서 중앙 UIImageView를 회전하고 싶습니다. – Steven