meow
meow

Reputation: 28164

Why does frame of UIImageView change at runtime?

I set the width and the height of the UIImageView to be 320 X 320, without using autolayout n size classes.

However, when i begin running it, and i printed out the imageview.frame.height, the printout was 419

Why would the height of the frame change, especially without using autolayout?

enter image description here

Upvotes: 0

Views: 266

Answers (1)

Caleb
Caleb

Reputation: 124997

You've set the view's autoresizing mask such that the view will expand along with its superview. The red arrows inside the square mean that the view will change size. The I-beams outside the square mean that the edges of the view are bounds to the edges of the superview.

autosizing mask

Upvotes: 2

Related Questions