ios4 - More iPhone 4 resolution scaling fun -
so have 2 images set fill screen - 1 @ 320x480 (iphone 3) , other @ 640x960 (iphone 4).
img.png (320x480) img@2x.png (640x960)
in interface builder, have img.png set fill view (it shouldn't filling iphone 4 view, though, right?), , when build , run, notably small.
so, when opposite, setting img@2x.png img, giant blue question mark fills view. project still builds , image fills screen, pixelated if has been rescaled. shouldn't have been rescaled, though, higher resolution.
now using...
img.png (640x960) img@2x.png (320x480)
i've tried switching file takes @2x suffix, has not helped either. smaller file taking @2x suffix, , setting image view img.png, shows way larger view canvas, way small when on phone. smaller file still having @2x suffix, tried switching view new img@2x.png , once again got oversized, pixelated question mark in ib , low res full-screen image when deployed phone.
i made sure view size set 640x960 in size inspector. else should doing?
don't use @2x
when specifying image name. use base name of image (so in case, img
). ios magic behind scenes use 2x version if it's on retina display , regular version otherwise (including when use xib lay out interface).
the displayed dimensions of image dimensions of non-2x image. retina display displays 2 pixels every 1 why scale 2.0 , have double dimensions of original image. view size in ib should 320x480.
edit
if ib being finicky, in xcode 4, try deleting xib , starting over. gets bit corrupted , doesn't know itself. i've had on 1 or 2 occasions, , seems worked op well.
Comments
Post a Comment