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

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -