pan
How can I capture which direction is being panned using UIPanGestureRecognizer?
On UIPanGestureRecognizer you can use -velocityInView: to get the velocity of the fingers at the time that gesture was recognised. If you wanted to do one thing on a pan right and one thing on a pan left, for example, you could do something like: – (void)handleGesture:(UIPanGestureRecognizer *)gestureRecognizer { CGPoint velocity = [gestureRecognizer velocityInView:yourView]; if(velocity.x … Read more
Pan & Zoom Image
After using samples from this question I’ve made complete version of pan & zoom app with proper zooming relative to mouse pointer. All pan & zoom code has been moved to separate class called ZoomBorder. ZoomBorder.cs using System.Linq; using System.Windows; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; namespace PanAndZoom { public class ZoomBorder : Border { … Read more