1.定义一个图片
2.将图片转为颜色
3.设置背景颜色
let backgroundImage = UIImage(named: "bg.png")
let backgroundColor = UIColor(patternImage: backgroundImage!)
self.view.backgroundColor = backgroundColor
1.定义一个图片
2.将图片转为颜色
3.设置背景颜色
let backgroundImage = UIImage(named: "bg.png")
let backgroundColor = UIColor(patternImage: backgroundImage!)
self.view.backgroundColor = backgroundColor