Ios 8 Orientation issue
3 answers
- (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;
}
+4
source to share
My problem was with the UIWindows frame that was going minus. So did the code as shown below in MyViewController - (NSUInteger) supported method InternfaceOrientations
[[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)];
Try it.
0
source to share