2014-10-03 2 views
3

는 iOS7에 개발 내 응용 프로그램, 장치에 대한 강제 방향 기지가 있습니다 아이폰 -> 초상화 의 Ipad -> 풍경IOS 8 방향의 문제는

iOS8의와

, 아이 패드에 내 앱이 그것을 세로 모드에서 시작하는 경우 풍경에 응용 프로그램을 보여하지만 결과는 것입니다

enter image description here

어떻게 아이폰 OS 8 방향을 수정?

답변

6

은 내가 내 자신의 질문에 대답 할 수 있는지 확실하지 않습니다,하지만 난 (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 방법의 말에

[self.window setFrame:[[UIScreen mainScreen] bounds]]; 

를 사용하여 문제를 해결했다. 내 문제가 마이너스로가는 UIWindows 프레임에 관련이

+0

당신은 당신 자신의 질문에 답할 수 있으며, 아무도 더 나은 대답으로 선택하지 않는다면 당신은해야합니다. 감사! –

4
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window { 



if ([window.rootViewController isKindOfClass:[UINavigationController class] ]) { 

    if ([[window.rootViewController presentedViewController] 
     isKindOfClass:[SignatureViewController class]]) { 
     return UIInterfaceOrientationLandscapeRight; 
    } 

    return UIInterfaceOrientationMaskPortrait; 
} 

    return UIInterfaceOrientationMaskPortrait; 

}. 그래서 MyViewController - (NSUInteger) supportedInterfaceOrientations 메서드에서 코드를 만들었습니다

[[UIApplication sharedApplication] setStatusBarHidden:NO]; 

[self.view setFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height)]; 

[appDel.window setFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height)]; 

이것을 시도하십시오.

0