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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -