0

I believe now Cocos2D 2.1 and above Support iPhone5 with image extension -widehd.png

I used same but not working in my game. Just searched in cocos2d and found these in CCFileUtils.h

- iPhone: ""
- iPhone HD: "-hd"
- iPhone5 : "-wide"
- iPhone5 HD: "-widehd"
- iPad: "-ipad"
- iPad HD: "-ipadhd"
- Mac: ""
- Mac HD: "-machd"

This indicates now by default cocos2d support iPhone5. Why not working for me?

Guru
  • 21,652
  • 10
  • 63
  • 102

2 Answers2

0

CCFileUtils has the option to search resources in folders without using Suffix, and it's more clean than the suffix. To do that change the search mode from suffix to directory by using the following code:

CCFileUtils *sharedFileUtils = [CCFileUtils sharedFileUtils];
[sharedFileUtils setSearchMode:kCCFileUtilsSearchDirectoryMode];

Then, create at least one of the following folders:

resources-iphone5hd (for iPhone 5 retina resources )
resources-iphone5 (for iPhone 5 non-retina resources )
resources-iphonehd (for iPhone retina resources )
resources-iphone (for iPhone non-retina resources )
resources-ipadhd (for iPad retina resources )
resources-ipad (for iPad non-retina resources )
resources-mac (for OS X resources)
resources-machd (for OS X retina resources. N/A yet)
Ziad Tamim
  • 350
  • 6
  • 17
0

In Cocos2d 3.0 its working with -iphone5hd extension

   imageName-iphone5hd.png  // For iPhone5 wide screen image
Guru
  • 21,652
  • 10
  • 63
  • 102