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