내 ipad 앱에 모달 뷰를 추가하려고합니다. 모든보기는 가로보기 모드로되어 있습니다. 스타일의 경우 양식 또는 페이지 시트를 선택했습니다.모달 뷰가있는 가로 모드
여기에 문제가 있습니다. 나는 다음과 같은 코드를 내보기로 모달 뷰를 추가 할 때 :
TempController *tmpViewController = [[TempController alloc] initWithNibName:@"TempView" bundle:nil];
tmpViewController.modalPresentationStyle = UIModalPresentationPageSheet;
[self presentModalViewController:tmpViewController animated:YES];
내 모달 뷰는 가로 모드로 표시되어 있지만 아래의보기는 세로로 표시됩니다. 모달이 해제 된 후에도보기는 여전히 potrait입니다. 보기에 모달을 연결하지 않으면보기가 가로 모드로 잘 표시됩니다.
나는 statusBarOrientation 및 shouldAutootateToInterfaceOrientation으로 경기를했지만 여전히 운이 없다. 나는 산 사자
갱신에 엑스 코드 4.4.1을 실행하고이 내 shouldAutorotateToInterfaceOrientation입니다 :
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
return YES;
}
return NO;
}
실제로 presentModal을 presentViewController로 변경했지만 여전히 동일한 문제가 발생합니다. – Irina
님이 ToAutorotateToInterface 오리엔테이션을 원래 게시물에 추가했습니다. – Irina