Develop

[iphone] 화면 전환 Portrait & Landscape Mode

by hooni posted Apr 23, 2013
?

Shortcut

PrevPrev Article

NextNext Article

ESCClose

Larger Font Smaller Font Up Down Go comment Print
아이폰 개발시에 가로모드 나 세로모드로 강제 전환이 
필요할 경우에 사용되는 코드 입니다.

//가로 모드 전환
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait];

//오른쪽 세로 모드 전환
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];

물론 방향을 돌린후에는 만들어 놓은 뷰도 각 모드에 맞는 뷰를 사용하셔야 합니다.