I want to see a full screen image on the iPhone. how many
pixels I have to set it? width and height are different for iphone 3 and
4?
My source code:
NSString *filePath = [[NSBundle mainBundle] pathForResource:theProduct.image ofType:@"png"];
UIImageView *img = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:filePath]];
img.frame = CGRectMake(0.0, 0.0, ?, ?);
[self.view addSubview:img];
What should I put instead of question marks?
Many thanks,
Stefano
You should set it to the size of the older iPhones: 320 x 480 pixels. The iPhone 4 will then double this to fit the screen. If you don’t want to see pixelation you will need to have another @2x image sized 640 x 960.