Note that there are some explanatory texts on larger screens.

plurals
  1. PO@2x retina image not displaying on retina device (iPod touch) or simulator (iPhone 4)
    primarykey
    data
    text
    <p>This is my first foray into designing two versions of images for retina or non-retina devices, so I suspect I'm doing something wrong, but I created two versions of an image, one is 302x193, the other is 604x386. They are named "displayCell1.png" and "displayCell1@2x.png", respectively.</p> <p>I also watermarked the @2x image to ensure that I can know if that's the one being displayed. As I understand it, my retina device (or the iPhone 4 simulator) should automagically detect the presence of the @2x version and display that. However, the following code is resulting in only the standard resolution version being displayed. Any help would be appreciated:</p> <pre><code>- (void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { static UIImage *bgImage = nil; if (bgImage == nil) { bgImage = [[UIImage imageNamed:@"displayCell1.png"] retain]; } cell.backgroundView = [[[UIImageView alloc] initWithImage:bgImage] autorelease]; cell.backgroundView.contentMode = UIViewContentModeTopLeft; } </code></pre> <p>I also tried it with just <code>imageNamed:@"displayCell1"</code>, also to no avail.</p> <p>I can include more detail as needed. Thanks!</p> <p><strong>EDIT:</strong></p> <p>I've now watermarked both images to be sure I know what I'm looking at. Cleaning targets didn't help and the images <em>are</em> being included in the .app bundle.</p> <p>Here's image one: <img src="https://i.stack.imgur.com/WEt7l.png" alt="enter image description here"></p> <p>Dimensions are 302x193</p> <p>Here's image two: <img src="https://i.stack.imgur.com/nRYbM.png" alt="enter image description here"></p> <p>Dimensions are 604x386</p> <p>And here's what I get when I run w/ the code above (note that cell height is dialed up, so only one cell is showing on-screen):</p> <p><img src="https://i.stack.imgur.com/scNHp.png" alt="enter image description here"></p> <p>I'm pretty stumped here.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload