给 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