Reputation: 9
I had a background image on my app developed for the iphone 4 screen size, however now with the larger iphone 5 screen size the image is too small and I ideally want it to resize automatically for the iphone 5 screen size. The image is displayed via an imageView object which I hoped would mean it would automatically resize for the new screen size. Is there a way to do this please? Thank you
Upvotes: 0
Views: 52
Reputation: 922
Use this:
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"yourImage"]];
And then you don't need to use UIImageView to create a background. If you wanna use UIImageView anyway, you can use Autolayout:
Upvotes: 1
Reputation: 12852
Two steps:
Upvotes: 1