给 UIView 设置背景图片
// 平铺
self.backgroundColor = UIColor(patternImage: UIImage(named:"recentExam_bgimg")!)
// 拉伸
self.layer.contents = UIImage(named:"recentExam_bgimg")?.cgImage
给 UIView 设置背景图片
// 平铺
self.backgroundColor = UIColor(patternImage: UIImage(named:"recentExam_bgimg")!)
// 拉伸
self.layer.contents = UIImage(named:"recentExam_bgimg")?.cgImage
本文标题:2018-12-18
本文链接:https://www.haomeiwen.com/subject/wpelkqtx.html
网友评论