Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2012  |  syntax: None  |  size: 0.28 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to save a UITableView's content as a PNG file?
  2. UIGraphicsBeginImageContext(self._tableView.contentSize);
  3. [self._tableView.layer renderInContext:UIGraphicsGetCurrentContext()];
  4. UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
  5.  
  6. return UIImagePNGRepresentation(image);