IOS普通截图

//这个例子是直接截取的viewController
UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, false, UIScreen.main.scale)
self.view.layer.render(in: UIGraphicsGetCurrentContext()!)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()

说点什么

avatar
  Subscribe  
提醒