누구든지이 작업을 수행하는 방법을 알고 있습니까?장치 자동 회전 기능이없는 iPhone의 회전을 어떻게 감지합니까?
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
}
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration {
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
}
- (void)willAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
}
- (void)didAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
}
- (void)willAnimateSecondHalfOfRotationFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation duration:(NSTimeInterval)duration {
}
는하지만 실제로 회전을 수행의 UIViewController 아니다 두려워 (모든 슈퍼 클래스를 호출 내의 UIViewController의 방법이 아닌 회전 무시) 회전에서 장치를 방지 할 수 있습니다
나는이 생각했다.내 UIViewController는 UINavigationController에 있습니다.
누구든지 아이디어가 있습니까?
건배, 닉.
실제로 모든 비어있는 대리자 메서드를 재정의 할 필요는 없으며 실제로 사용해야하는 메서드 만 재정의해야합니다. 호출자는 사용자가 정의했는지 여부에 관계없이 서브 클래스가 호출하기 전에 특정 메소드에 응답하는지 테스트해야합니다. 그것은 대표자가 일하는 방식 일뿐입니다. –