Reputation: 73
We started one new project and same time apple released new iPhone6. Whats its resolution and how to add iphone6 image in cocos2d ?
Like below are extension for earlier device
-hd : iphonehd
-ipad : ipad
-ipadhd : ipadhd
-iphone5hd : iphone5
So how to add iPhone 6 ?
Upvotes: 1
Views: 1545
Reputation: 22042
Portrait Resolutions:
iPhone 6 : 750 X 1334 pixels (4.7inches)
iPhone 6 Plus : 1242 X 2208 pixels (5.5inches)
No need to handle these two new resolution. Os itself scaled. In iPhone6, iphone5 graphics used.
NOTE :
1. #define IS_IPHONE5 (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 568.0f)
2. #define IS_IPHONE5 (([[CCDirector sharedDirector] winSize].width == 568.0f) ? YES : NO )
if(IS_IPHONE5)
Now Case 1 fails in iPhone6 and iPhone 6 Plus. So use 2. No other changes needed for iphone6 support.
Upvotes: 1