I have a view named myView
which is always half the screen and sit at the top of screen.
Inside this view I added an UIImageView
with 120x120 size which sits in center of the myView
(horizontally and vertically). Inside the IB, to satisfy the constraints(X & Y) I always need to set a fixed width and height for my image, after I set center horizontally and center vertically.
But with a fixed height and width, the image doesn't resize when changing the screen size. I want my image to resize when running on iPhone5 or iPhone 4s, because myView
will resize.
I need something like the image should depend on the myView
size.
How to actually achieve this ?