Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swift screenshot

UIGraphicsBeginImageContext(view.frame.size) // Size of the screen
view.layer.renderInContext(UIGraphicsGetCurrentContext()) 
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
 
PREVIOUS NEXT
Tagged: #swift #screenshot
ADD COMMENT
Topic
Name
4+4 =