Question : swift screenshot
Answered by : velmurugan
UIGraphicsBeginImageContext(view.frame.size) // Size of the screen
view.layer.renderInContext(UIGraphicsGetCurrentContext())
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
Source : | Last Update : Sun, 29 May 22