Search code examples
swiftcocoacocoa-touch

How to create a "Mini Map" of a large NSView/UIView?


I have a diagram (NSView) that can get very big. I would like to provide a "Mini Map" that shows the whole View in small as a help for navigation (see as an example: https://en.wikipedia.org/wiki/Mini-map).

Is there any trick on how to do this easily? Did someone already create such a Map View?


Solution

  • There 2 options where you can start:

    • You can try to do scaled down snapshot. If your content don't change to often, it may be great solution
    • Look at CAReplicatorLayer, it may be helpful