I’d like to “lock” my background image (a UIImageView) such that it doesn’t look like it’s getting cropped when I rotate my device. It looks correct in landscape view, but doesn’t follow along with the rotation.
I’ve tried stretching it using setAutoresizingMask, but the results look horrible. I’ve fiddled around with the transform property of the UIImageView, but fail to make it look correct.
Any pointers would be appreciated. I’m not even sure if I’m on the right track.
OK, I managed to make it work using the following code:
Bear in mind that background~ipad.png is 1024×768, that is landscape as default. If your image is portrait you need to check for landscape instead of portrait in the conditional cases.