Summary에서 Supported Device Orientations에서 사용할 Orientation을 선택한 후에
- (void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
if (toInterfaceOrientation == UIInterfaceOrientationPortrait ||
toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown){
NSLog(@"Vertical");
} else if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
toInterfaceOrientation == UIInterfaceOrientationLandscapeRight) {
NSLog(@"Horizontal");
}
}
각 ViewController에서 willRotateToInterfaceOrientation 메소드를 호출하여 상황에 따른 액션을 취해주면 된다.
'프로그래밍 > 정보' 카테고리의 다른 글
| [iOS] 웹에서 애플리케이션을 실행하는 방법. (2) | 2012/04/04 |
|---|---|
| [iOS] 회전에 따른 뷰를 설정하는 방법. (0) | 2012/03/27 |
| [iOS] 다국어 문자열을 지원하기 위한 방법. (1) | 2012/03/05 |
| [정보] 비주얼 스튜디오 2010 환경에서 DirectX의 컴파일이 되지 않을 때 (3) | 2010/07/03 |
| [정보] BOOL과 bool의 차이점 (0) | 2009/08/01 |
| [이슈] Memcpy()가 사라진다!? (0) | 2009/05/17 |

댓글을 달아 주세요