Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Sample project to show difficulty in grabbing a snapshot of a CATiledLayer-backed view.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
alpstein-route-me @ ce16b38

This is a demo to show the difficulty in grabbing a snapshot of a CATiledLayer-backed view.

NOTE: As of 813fcb this has been worked around using manual re-rendering of each tile making up the current image. To see the non-working example, start at c3e00f instead.

Relevant discussions:

Note the difference between the first segment, which renders the main view including the pink subview, and the second segment, which renders a blank gray area instead of the map view.

The map view is from the Alpstein Route-Me fork, which is essentially, in order:

  1. A generic UIView containing
  2. A UIScrollView that pans & zooms containing
  3. A UIView subview backed by a CATiledLayer.

Note that the private API UIGetScreenImage() captures the whole snapshot accurately in both cases. I've not found another method yet which does.

Something went wrong with that request. Please try again.