BloonsTowerDefence
BloonsTowerDefence

Reputation: 1204

UIImageView Resizing

On my storyboard I have a UIImageView which doesn't take up the whole screen, as intended. At runtime the image takes up the whole screen, which is a problem because I want to add some buttons on the top.

Here is where I assign the picture to the view:

_imageView.image = [UIImage imageNamed:@"floors.png"];

And here are the relevant screenshots:

UIImageView in storyboard (doesn't take up full view) At runtime, when it takes up full view and overlaps 'Button'

How can I get the image to stay the same size as on the storyboard?

Upvotes: 0

Views: 363

Answers (1)

Lithu T.V
Lithu T.V

Reputation: 20021

enter image description here

Set view mode of imageview to scale To Fill in storyboard

Another option to check is whether you are setting the autolayout properly

Upvotes: 2

Related Questions