0

I'm trying to update my cocos2d game for iOS 8 and getting issues.

My game with Xcode 6 GM, iPhone 5 simulator with iOs 7.0.3 was working fine but using iOS 8 simulator all images are shifted to 25% left and 25% top and I can't get correct coordinates. Please refer image for details enter image description here

Any help appreciated Cheers Jeet

jeet.chanchawat
  • 5,842
  • 5
  • 38
  • 59

5 Answers5

3

Set correct device orientation in target settings Device orientation settings

anticyclope
  • 1,577
  • 1
  • 10
  • 26
3

I am having the exact same issue. For me, I was able to "fix" it by simply selecting "Portrait" for device orientation (even though my app is landscape like yours).

I realize this isn't the cleanest fix and it might have unintended consequences, but, since I need to update my app asap (it crashes on iOS 8), I'm going with this solution for now.

I hope this helps!

2

For those of you who have exactly the same problems, just use [[CCDirector sharedDirector] winSize] instead of using [[UIScreen mainScreen] bounds].size Also don't forget to add new launch images for iPhone6/+ in Xcode 6. You can use your iPhone 5/S launch image. In this case you don't need to make new image assets for iPhone 6/+ resolutions

  • Changing that is not having any effect in my case :( window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; My window is still initialised this way. What to replace it with ? – jeet.chanchawat Sep 15 '14 at 06:41
1

I was able to fix, (put it portrait) and...

NSString *reqSysVer = @"6.0";
NSString *currSysVer = [[UIDevice currentDevice] systemVersion];

if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending)
{
    [window setRootViewController:viewController]; //iOS 6
} else {
    [window addSubview: viewController.view]; //iOS 5 or less
}
CGAffineTransform transform = CGAffineTransformMakeRotation(3.14159/2);
viewController.view.transform = transform;
user965010
  • 91
  • 1
  • 4
0

I find another way to fix it in my project check the related question: https://stackoverflow.com/a/26362815/2448816

Community
  • 1
  • 1
Pierre
  • 417
  • 3
  • 11