2011-01-22 4 views
1

응용 프로그램을 크래킹 중입니다.가로 모드에서 기본보기와 함께 하위보기를 변환하는 방법

주보기 1 개와 하위보기 4 개가 있습니다.

나는 이러한 4 가지보기를 존경받는 버튼 동작을 사용하여 하위보기로 추가합니다.

이제 토지 풍경과 묘사에 대한 지원을해야합니다.

필자는 시뮬레이터를 회전하여 랜드 스케이프 하위 뷰로 묘사 할 때 회전하지 않습니다.

이렇게 표시됩니다. link1, link2

일부 나는 장치가 회전을 감지 할 때 우리 자신을 변형시켜야한다는 것을 알았습니다.

내가 어떻게 할 수 있는지 찾지 못했습니다.

아무도 도와주세요.

미리 감사드립니다.

답변

1

먼저 지원되는 모든 방향에 대해 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 을 사용하고 YES를 리턴해야합니다.

그럼 당신은 - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration 구현하고 설치하면 서브 뷰의 속성 따라 또는

+0

파단에 대한 적절한 autoresizingMask을 지정하거나 - (무효) willRotateToInterfaceOrientation : (UIInterfaceOrientation) toInterfaceOrientation 시간 : (NSTimeInterval) 기간 { \t test.autoresizingMask =을 UIViewAutoresizingFlexibleWidth; }이 시도하고 있지만 결과가 없습니다 – MaheshBabu

+0

willRotateToInterfaceOrientation에 autoresizingMasks를 지정하지 마십시오. duration, 프레임을 변경합니다 (일반적으로). 코드를 올려주세요. – tux91

관련 문제