2

콘텐츠가 표시되는 detailview가 있습니다. 내가이 helpViewController을 기각 할 때dismissModalViewController 이후에 장치 방향을 수정하는 방향을 설정하는 방법은 무엇입니까?

[self.viewController presentModalViewController:helpViewController animated:NO]; 

그래서,의 detailview이 portraitMode 항상 : 버튼과 내가 다른보기의 모달을 제시하고있다.
정확한 장치 방향을 찾으십시오. 나는 장치 방향으로 회전이 그것을 시도

는 :

if ([UIViewController respondsToSelector:@selector( 
    attemptRotationToDeviceOrientation)]) { 

    [UIViewController attemptRotationToDeviceOrientation]; 
} 

helpViewController viewDidAppear 기각 후 detailView에서 호출되지 않은 것으로 보인다.
어떻게 작동시킬 수 있습니까?

답변

1

Plz은

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation 
{ 
// Return YES for supported orientations 
return YES; 
// return (interfaceOrientation == UIInterfaceOrientationPortrait); 

} 
+0

shouldAutorotateToInterfaceOrientation의 리턴 값이 이미 나던 작업을 YES로 설정하지만, 여전히함에 따라 detailview.m을 설정하려고합니다. – brush51

+0

및 detailview의 상위 뷰는 어떻습니까? –

+0

도 YES로 설정하십시오. – brush51