piaoyongren / core-plot

Automatically exported from code.google.com/p/core-plot
0 stars 0 forks source link

Gesture Recognizers in Host View for iOS #240

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Gesture Recognizers should be used in the graph host view to recognize pinches 
on the plot area to zoom in and out, as well panning around.

Checks should be in place to make sure the gesture is in the plot area.

Original issue reported on code.google.com by drewmcco...@mac.com on 8 Jan 2011 at 9:42

GoogleCodeExporter commented 9 years ago
Submitted code for supporting pinches in my cloned repository

Pinch gestures will work automatically in all layers where user interaction is 
enabled. Implementation follows the procedures for touch events.

No special example is necessary but the new implementation has been tested with 
the core-plot test examples in which scatter plots are shown. Pinching changes 
the ranges in CPXYPlotSpaces. Delegates have priority over built-in 
functionality.

Original comment by google@skywind.eu on 7 Feb 2011 at 5:00

GoogleCodeExporter commented 9 years ago
Nice work. 
I cleaned things up a bit, making them more platform independent (Mac has no 
gesture recognizers), and pushed the changes.
Thanks!

Original comment by drewmcco...@mac.com on 8 Feb 2011 at 3:05

GoogleCodeExporter commented 9 years ago
As of 10.6, touch gestures are supported under MacOS, too, on laptops and 
Apple's Magic Trackpad. See the NSResponder docs for info.

Original comment by eskr...@mac.com on 9 Feb 2011 at 12:08

GoogleCodeExporter commented 9 years ago
True, but they are a different type of touch gesture, I think. In any case, I 
don't think a pinch works very well on the Mac. It would probably better to 
offer a region selection option for zooming.

Original comment by drewmcco...@mac.com on 9 Feb 2011 at 8:41