Answer the question
In order to leave comments, you need to log in
Why aren't files for UI signed @2x loaded on the Ipad simulator?
The fact is that on an iPad with a screen resolution of 768x1024, ordinary images are loaded, as for an iPhone. And with an iPad with a screen resolution of 1536x2048, everything is in order, also a simulator. Why is this happening and how to get out of the situation?
Answer the question
In order to leave comments, you need to log in
Use the special folder Assets, so you will immediately see what resources and for what permissions you have available. @2x for retina displays only
so the first one is not a retina, but 2x for retin is loaded. add a set of 2x to the media to resolve it.
Here is the basic implementation +[UIImage imageNamed:]
+ (UIImage *)imageNamed:(NSString *)aImageName
{
NSData *imageData;
if ([UIScreen mainScreen].scale == 2.0) {
imageData = [NSData dataWithContentsOfFile:[aImageName stringByAppendingString:@"@2x"]];
} else {
imageData = [NSData dataWithContentsOfFile:aImageName];
}
return [UIImage imageWithData:imageData];
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question