Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public func screenShot() -> UIImage? {
- UIGraphicsBeginImageContextWithOptions(self.bounds.size, true, 0)
- self.drawViewHierarchyInRect(self.bounds, afterScreenUpdates: true)
- let img = UIGraphicsGetImageFromCurrentImageContext()
- UIGraphicsEndImageContext()
- return img
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement