2015. 8. 14.

using image as x repeated background in swift

I found many solutions above title. but It is written in a objective-c  like that:

objView.backgroundColor = [[UIColor allocinitWithPatternImage:[UIImage imageNamed:@"background_image"]];


but in swift   it can be written like that:


 objView.backgroundColor = UIColor(patternImage: UIImage(named: "background_image")!)

댓글 없음:

댓글 쓰기