ios - UIImageView does not stretch to whole screen -


i prototype app , navigation , uiimageview in viewcontrollers, created in storyboard (xcode 6) not stretch full screen. example, have uiimageview 640×1136 image. if run on iphone 5, shows me full screen. if run on iphone 6 or 6 plus, locates in top left corner. read many topics , articles, nothing helped.

enter image description here

enter image description here

make sure uiimage in uiimageview , either add constraints or change content mode this:

myimageview.contentmode = uiviewcontentmodescaleaspectfit; 

or change in story board in attributes inspector under view.

here list of values can set property.

edit: reading issue over, think need add constraints view. there lots of tutorials on how this: here apples.

you add constraints clicking pin menu, , clicking on 4 red brackets , clicking "add constraints".

enter image description here


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -