Fixed issue where a tap would transition PanZoomGestureRecognizer to Ended rather than Failed, firing a TouchCompleted for a touch that never started (and interfering with other gesture recognizers that the application might have added, e.g. a UITapGestureRecognizer)
This commit is contained in:
Родитель
33e2958aaa
Коммит
a14d65ef38
|
@ -193,7 +193,15 @@ namespace OxyPlot.MonoTouch
|
|||
if (!this.activeTouches.Any())
|
||||
{
|
||||
this.TouchEventArgs = firstTouch.ToTouchEventArgs(this.View);
|
||||
this.State = UIGestureRecognizerState.Ended;
|
||||
|
||||
if (this.State == UIGestureRecognizerState.Possible)
|
||||
{
|
||||
this.State = UIGestureRecognizerState.Failed;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.State = UIGestureRecognizerState.Ended;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -228,7 +236,15 @@ namespace OxyPlot.MonoTouch
|
|||
if (!this.activeTouches.Any())
|
||||
{
|
||||
this.TouchEventArgs = firstTouch.ToTouchEventArgs(this.View);
|
||||
this.State = UIGestureRecognizerState.Cancelled;
|
||||
|
||||
if (this.State == UIGestureRecognizerState.Possible)
|
||||
{
|
||||
this.State = UIGestureRecognizerState.Failed;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.State = UIGestureRecognizerState.Cancelled;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче