프로그래밍/정보2012/03/27 21:28

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 메소드를 호출하여 상황에 따른 액션을 취해주면 된다.

저작자 표시 비영리 동일 조건 변경 허락
Posted by 크리스_

댓글을 달아 주세요

프로그래밍/정보2012/03/05 11:06
소스코드 내에 NSLocalizedString(key, comment) 형태로 제작하였을 경우에

$ genstrings -o en.lproj *.m



위와 같은 형태로  터미널에서 명령을 입력할 경우, 프로젝트 내의 로컬라이즈 스트링을 검색하여 자동으로 만들어준다.

만약 genstrings: couldn't connect to output directory en.lproj 과 같은 에러가 발생할 경우
해당 디렉터리가 존재하지 않기 때문에 발생하는 문제로
[국가코드.lproj]와 같은 빈 디렉터리를 생성하고 실행하면 정상적으로 생성이 된다. 
저작자 표시 비영리 동일 조건 변경 허락
Posted by 크리스_

댓글을 달아 주세요

  1. 비밀댓글입니다

    2012/03/27 16:18 [ ADDR : EDIT/ DEL : REPLY ]

:어떤 동기가 있어 이제까지 가졌던 마음가짐을 버리고 완전히 달라짐.

 
블로그를 너무 놀린 것 같아 다시 시작해야하겠다. 
저작자 표시 비영리 동일 조건 변경 허락
Posted by 크리스_

댓글을 달아 주세요