I have a PanGestureRecognizer in my custom view. For the PanUpdated event handler, I have a function that does some stuff when the gesture is running and then something else when the gesture is completed. However, sometimes the gesture never gets to its completed state.
Any ideas?
Here's what I have...
class ImageContainer : ContentView
{
public ImageContainer()
{
PanGestureRecognizer panGesture = new PanGestureRecognizer();
panGesture.PanUpdated += OnPanUpdated;
GestureRecognizers.Add(panGesture);
}
void OnPanUpdated(object sender, PanUpdatedEventArgs e)
{
switch(e.StatusType)
{
case GestureStatus.Started:
// do some stuff
break;
case GestureStatus.Running:
// do more stuff
break;
case GestureStatus.Completed:
// sometimes this does not get called!
break;
}
}
}