//1.通过UIImageView设置 self.view.insertSubview(UIImageView.init(image: UIImage.init(named: "123")),at: 0) //2.通过layer的content self.view.layer.contents = UIImage.init(named: "123")?.cgImage self.view.contentMode = UIViewContentMode.scaleToFill
//1.通过UIImageView设置 self.view.insertSubview(UIImageView.init(image: UIImage.init(named: "123")),at: 0) //2.通过layer的content self.view.layer.contents = UIImage.init(named: "123")?.cgImage self.view.contentMode = UIViewContentMode.scaleToFill