ios - Full Screenbackground Image in Swift -
i seek fullscreen background ios project means image should stretch on total background. seek 2 things won't worked out solution.
1)
self.view.backgroundcolor = uicolor(patternimage: uiimage(named: "background.png")!)
this set background image on actual image size , repeat in x , y, not stretch image fullscreensize.
2)
use uiimage , create equal width , height , utilize aspect fill, not give wanted solution , utilize much memory
is there other way done?
so have 2 ways autolayout
1) add-on of inequality constraint shown in images below.
2) or adding leading, trailing space , top, bottom space constraint , centering vertically , horizontally constraints no explicit height nor width constraint.
ios swift background uiimage
No comments:
Post a Comment