2
어떻게 든 UITabBarController 회전하려면 UI 테스트 컨트롤러 (UITabBarController 항목) 회전 할 수 있습니까?회전하려면 UITabBarController 중지하지만 UIViewController 회전하려면
장치가 세로 모드 인 경우 탭 막대는 화면 아래쪽에 있지만 사용자가 장치를 왼쪽으로 회전하면 tabbar 컨트롤러가 왼쪽에 있어야하며 (UIViewController 만 해당) 회전?
UIInterfaceOrientation interfaceOrientation = self.interfaceOrientation; if (interfaceOrientation == UIDeviceOrientationLandscapeLeft) { NSLog (@ "True"); self.view.center = CGPointMake (CGRectGetWidth (self.view.bounds), 0.0); // 화면에서 그것을 가리기 위해 90도 회전 CGAffineTransform rotationTransform = CGAffineTransformIdentity; rotationTransform = CGAffineTransformRotate (rotationTransform, DegreeToRadian (90)); self.view.transform = rotationTransform; } – Anand
위의 코드를 사용했지만 올바르게 작동하지 않았습니다. 나는 또한 뷰 자체를 회전시키는 것에 대해 생각했지만 어느 것이 더 효율적인 방법인지 확신하지 못했다 (애니메이션은 배터리를 더 많이 사용할 것이다) – Anand