0

Xcode 6.1.1: Running in iPad Retina simulator, everything looks great. Correct scale, etc.

But when running in iPad Air simulator, graphics and positioning are all half of what they should be.

Why would it work in one and not the other? Aren't iPad Retina and iPad Air pretty much the same thing? Same resolution, same points, both considered 'iPad' and 'Retina'... so what's the deal? Any ideas?

Josh
  • 8,079
  • 3
  • 24
  • 49
  • Have you add both retina and non retina images ? for example image.png and image@2x.png ? – Daniele Candotti May 06 '15 at 09:57
  • @DanieleCandotti Yes, both retina and non-retina images are in place. iPad Retina correctly uses the retina images but iPad Air doesn't (or some other problem). – grasshopper May 06 '15 at 10:11
  • @lftikhar Looking into Auto Layout, but everything else already works (iPhone4/5/6, all iPads except Air) so I'm hoping this is just some small oversight. – grasshopper May 06 '15 at 10:14
  • Code...? We're not magicians :-) – Schemetrical May 06 '15 at 11:43
  • Any chance it is running as an iPhone app in the simulator? Is the app centered in the middle of the screen? If so sounds like your architecture settings are wrong for the build. Go to project -> build settings, select to show All and check it is building for arm64, armv7 and armv7s – Rory McKinnel May 06 '15 at 13:43
  • Some more info: -it's definitely using the correct graphics for iPad -what's wrong is the ContentScaleFactor; it's displaying all graphics at half size (except for the BG?? which is a fullscreen single picture) -in AppDelegate, if I set [[CCFileUtils sharedFileUtils] setiPadContentScaleFactor:2], then the iPad Retina sim will look exactly like the iPad Air sim (graphics half size). -when logging the number at [[CCDirector sharedDirector] contentScaleFactor], it ALWAYS shows a factor of 2, even when I change it around with CCFileUtils. This number needs to be 1 for iPad Air, I'm guessing. – grasshopper May 07 '15 at 03:31
  • @DanieleCandotti ok, as last-ditch effort I tried changing all the suffixes to -@2x instead of what I was already using, and magically it works across all devices! How do I mark your answer as the one? :D Thanks so much! – grasshopper May 07 '15 at 08:26
  • @grasshopper you're welcome , I have added as an answer – Daniele Candotti May 10 '15 at 14:57

2 Answers2

0

Check if you have retina and non-retina images, for example

  • image.png (non-retina / standard).
  • image@2x.png (retina / hight-resolution).
  • arrg it worked, but now the iphone images are all wrong (too big). I got all devices working by making 3 separate picture databases (no extension, -hd extension, and then @2x extension), but it makes the filesize considerably larger (two copies of the exact same graphics). how do I make iPad and iPhone retina share resources?? I feel like I'm missing something important... – grasshopper May 13 '15 at 04:17
0

I had the same issue. In my case it was a matter of commenting out a category method, taken from this SO answer: Images not showing up when architecture set to 64 bit

Community
  • 1
  • 1
Got99Errors
  • 328
  • 3
  • 11