Pinch-to-zoom in the UI module
simonh last edited by
Are there any plans to implement this? I'm writing a mapping utility for a science fiction game and this would be a very valuable feature.
JonB last edited by
It is not too hard to roll your own custom view. See this example which allows pinch zoom using the borders. Earlier versions let you pinch within the view itself. The tricky part is correcting for the fact that the frame size is changing at the same time the touches are moving.
Actually, in your case, you wouldn't change the frame size, but would instead keep a local variable zoom factor and scroll offsets, and use that to draw whatever you are drawing.
For this example, in the beta, remove the 'sheet' from the last line. I haven't gotten around to updating this to correct the frame size.