2014-10-03 2 views
0

일부 viewcontroller에서 화면 회전을 사용 불가능하게 설정하려고했지만 작동하지 않는 경우 '선언되지 않은 식별자 사용'shouldAutorotateToInterfaceOrientation ' "IOS 8을 사용하고 있는데 무엇을 놓칠까요?Obj-C, 화면 회전을 사용/사용하지 않음 - 작동하지 않음

- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation { 
     return (interfaceOrientation == UIInterfaceOrientationPortrait); 
    } 

답변

0

방향을 당신이보기가 YES 수익을 회전 할 때마다의 ViewController으로 회전하여 응용 프로그램을 설정하고 아니오 뷰 컨트롤러의 나머지 부분에.

  • (BOOL) shouldAutorotate { return NO; }

  • (NSUInteger) supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } 응용 프로그램 방향 일단

는 방향의 특권을 유지하고 모든 viewcontrollers에 별도로 추가 작업을 수행해야하므로 응용 프로그램의 중간에 변경할 수없는 설정입니다.

0

이 시도 :

- (BOOL)shouldAutorotate { 
    return NO; 
} 

- (NSUInteger)supportedInterfaceOrientations { 
    return UIInterfaceOrientationMaskPortrait; 
} 
관련 문제