I created a category to view rotation, and also added views to view controllers, as well as a window (to display a custom indicator). My code works fine up to 7.X with xCode 5.X as well as xCode6-beta6. But not suitable for iOS 8 beta testing. Window rotation does not seem to work with ios 8 beta, like old ios.
Could you suggest me .... Thanks in advance.
My code looks like
- (void)application:(UIApplication *)application willChangeStatusBarOrientation:(UIInterfaceOrientation)newStatusBarOrientation duration:(NSTimeInterval)duration { if(!self.isIpad) { [menu.view rotateViewToOrientation:newStatusBarOrientation animated:YES]; if(newStatusBarOrientation==UIInterfaceOrientationPortrait || newStatusBarOrientation==UIInterfaceOrientationPortraitUpsideDown) { if (IS_IPHONE_5) { menu.view.frame= CGRectMake(0, 518, 320, 50); } else { menu.view.frame= CGRectMake(0, 430, 320, 50); } } else if(newStatusBarOrientation==UIInterfaceOrientationLandscapeLeft) { if (IS_IPHONE_5) { menu.view.frame= CGRectMake(270,0,50,568); } else { menu.view.frame= CGRectMake(270,0,50,480); } } else { if (IS_IPHONE_5) { menu.view.frame= CGRectMake(0,0,50,568); } else { menu.view.frame= CGRectMake(0,0,50,480); } } [menu reloadMenu]; } }
ios objective-c ios8
Kanjariya-IOS Sep 05 '14 at 11:29 2014-09-05 11:29
source share