1
내보기는 원래 가로 모드입니다. 단추가 녹화되면보기가 세로 모드로 열리고 모든 것이이 지점까지 있습니다. 문제는 내가 그보기에서 루트보기로 돌아갈 때보기가 올바르게 회전하지 않을 때입니다. 여기에 내가 세로에서 가로로보기를 회전하는 데 사용하는 코드, 여기iPad가 세로에서 가로로 회전합니다.
-(void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
//rotate the page to lansscape
CGAffineTransform landscapeTransform = CGAffineTransformMakeRotation(-90*0.0174532925);
landscapeTransform = CGAffineTransformTranslate (landscapeTransform, 0.0, 0.0);
[self.navigationController.view setTransform:landscapeTransform];
self.navigationController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth |UIViewAutoresizingFlexibleHeight;
self.navigationController.view.frame = CGRectMake(0.0, 0.0, self.view.frame.size.width, self.view.frame.size.height);
self.navigationController.view.center = CGPointMake (384.0, 544.0);
[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeLeft;
}
는 세로 페이지에서 돌아온 후 가로 모드에서 루트 페이지의 스크린 샷이다
이것은
xib 방향을 확인하십시오. – Santhosh
물론 풍경입니다! – Mona