views:

258

answers:

2

I am subclassing a UITableViewCell and in the init function I am doing the following:

UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"packagelistcell_background.png"]];
[imageView setFrame:CGRectMake(0, 0, 300, 81)];
self.backgroundView = imageView;
[imageView release];

When that displays on the screen, the image appears slightly blurred. For testing, I placed a straight UIImageView above the table view and the image looks perfect and crisp. The table view is a grouped table view. Do you know why it is blurring the image?

A: 

Try shifting the imageView by 0.5 pixels.

St3fan
what would that do?
rickharrison
+1  A: 

I think the cell has been resized and so is the backgroundView.

Try

imageView.autoresizingMask = UIViewAutoresizingNone;
freytag