2011-03-17 4 views
1

각 방향 (Portrate 및 Landscape)을 다른보기로 보여주는 iPhone 용 앱을 개발 중입니다.StatusBarOrientation iPad의 애니메이션 문제

및 이와 같은 statusBar 애니메이션을 프로그래밍하지 않았습니다.

[application setStatusBarOrientation : UIInterfaceOrientationPortrait animated : NO];

하지만 아이 패드 응용 프로그램을 실행하고 회전 할 때,

상태 표시 애니메이션 occered!

왜 statusBar Animation 설정이 무시됩니까?

답변

1

모든 것을 분해하지 않고 애니메이션을 비활성화 할 수 있습니다. 당신의 UIViewController에

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { 
    [UIView setAnimationsEnabled:YES]; 
} 


- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 
    [UIView setAnimationsEnabled:NO]; 
    /* Your original orientation booleans*/ 
} 

장소를 모두 잘해야한다 :

다음과 같은 코드가 다른 애니메이션이나 방향 코드 덤비는없이 "블랙 박스"회전 애니메이션을 사용할 수 없게됩니다. 같은 방법을 iOS의 원하지 않는 애니메이션에도 적용 할 수 있습니다.

프로젝트와 관련하여 가장 좋습니다.

+1

감사합니다 백만! 귀하의 코드는 악몽 같은 애니메이션 버그를 삭제했습니다! – TETTASUN

+0

다행이 당신을 도왔습니다. –

-1

info.plist 파일에 방향 설정을 추가 했습니까?

<key>UIInterfaceOrientation~ipad</key> 
<string>UIInterfaceOrientationLandscapeLeft</string> 
+0

답변 해 주셔서 감사합니다. 그러나 그것은 애니메이션을 멈추지 않습니다 ... – TETTASUN