Created
November 20, 2013 04:16
-
-
Save bernardinus/7557624 to your computer and use it in GitHub Desktop.
cocos2d-iphone v1.0.1 iOS 6 Fix AppDelegate.m replace [window addSubview:viewController.view]; RootViewController.m add new function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//iOS 6 Fix | |
{ | |
NSString *reqSysVer = @"6.0"; | |
NSString *currSysVer = [[UIDevice currentDevice] systemVersion]; | |
if([currSysVer compare:reqSysVer options:NSNumericSearch]!=NSOrderedAscending) | |
{ | |
[window setRootViewController:viewController]; | |
} | |
else | |
{ | |
[window addSubview:viewController.view]; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma mark - | |
#pragma mark iOS 6 Fix | |
//iOS 6 | |
#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED | |
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000 | |
-(NSUInteger)supportedInterfaceOrientations{ | |
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown; | |
} | |
- (BOOL)shouldAutorotate { | |
return YES; | |
} | |
#endif | |
#endif | |
#pragma mark End iOS 6 Fix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment