NSString *devicetype;
if((UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)){
devicetype = @"ipad";
}else{
devicetype = @"iphone";
}
I have two images
BACKGROUND_IPAD.PNG
AND
BACKGROUND_IPHONE.PNG
Now I want to use this string like
BackGround = [CCSprite spriteWithFile:[NSString StringWithFormat:@"background_%@.png",DEVICETYPE]];
Is this possible? If not, then is there a better way?