KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm looking to put iPad retina (crazy!) quality images into my app for the 'New iPad's launch on the 16th Martch. However I can't find the correct suffix for my file names anywhere in the documents! I use @2x suffix for iPhone and iPod retina display. If anyone else knows what it is/will be for the iPad and, even more, can show me a link to the official documents on this I'd really appreciate it. Thanks! :-D EXTRA: Thought I'd just leave a bit of code I've started using to use my iPhone @2x images for the iPad non-retina ones (as most of my @2x~iphone and ~ipad images were the same and duplicates are just a waste of space). + (UIImage*)imageNamedSmart:(NSString*)name { UIImage *returnImage = [UIImage imageNamed:[NSString stringWithFormat:@"%@", name]]; if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] && [[UIScreen mainScreen] scale] == 2) { // iPad Scale 2 i.e. 3rd Gen iPad } else { // iPad Scale 1 i.e. 1st and 2nd Gen iPad return [UIImage imageNamed:[NSString stringWithFormat:@"%@@2x", name]]; } } return returnImage; } This means instead of calling: [UIImage imageNamed:@"imageName"] You call: [self imageNamedSmart:@"imageName"] Hope this help people a bit more. :-D (I found this idea by goggling but I can't find the original site to link, so thank you whoever you were.)
Tags (comma-separated)
Save Edits
Cancel