Resize image to iOS device background -
i rescale image fit width of ios screen. following code used.
@iboutlet var bgimageview: uiimageview override func viewdidload() { super.viewdidload() bgimageview.contentmode = uiviewcontentmode.scaleaspectfit; bgimageview.frame.size.width = uiscreen.mainscreen().bounds.width; }
this solution seems causing thread problems. what's wrong here?
you can set image view constrains follows - width should equal super view width, centerx , centery same super's. , height not equal constraint, lessthanorequal super's height.
and yes, useless set frame manually while using auto layout constraints
Comments
Post a Comment