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.
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".
Comments
Post a Comment