Skip to content

Instantly share code, notes, and snippets.

@isoiphone
Last active December 11, 2015 09:27
Show Gist options
  • Select an option

  • Save isoiphone/95c67c426c2afa2e65c7 to your computer and use it in GitHub Desktop.

Select an option

Save isoiphone/95c67c426c2afa2e65c7 to your computer and use it in GitHub Desktop.
func emptyImage() -> UIImage {
UIGraphicsBeginImageContext(CGSize(width: 1, height: 1))
let img = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return img
}
let img = emptyImage()
let dat = UIImagePNGRepresentation(img)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment