Why does my programmatically created screenshot look so bad on iOS 7?

New API has been added since iOS 7, that should provide efficient way of getting snapshot

  • snapshotViewAfterScreenUpdates: renders the view into a UIView with unmodifiable content

  • resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets : same thing, but with resizable insets

  • drawViewHierarchyInRect:afterScreenUpdates: : same thing if you need all subviews to be drawn too (like labels, buttons…)

You can use the UIView returned for any UI effect, or render in into an image like you did if you need to export.

I don’t know how good this new method performs VS the one you provided (although I remember Apple engineers saying this new API was more efficient)

Leave a Comment