Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. public func screenShot() -> UIImage? {
  2. UIGraphicsBeginImageContextWithOptions(self.bounds.size, true, 0)
  3. self.drawViewHierarchyInRect(self.bounds, afterScreenUpdates: true)
  4. let img = UIGraphicsGetImageFromCurrentImageContext()
  5. UIGraphicsEndImageContext()
  6. return img
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement