Cannot receive more than one touch in TouchMoved
-
20-06-2021 - |
質問
I want to get the position of moving touches, so I need to get the array of touches which are moving in the TouchesMoved. I know how to get the array but the problem is that it only gets the one touch, and when I put more than one finger, it gives the first touch info only cause the array has one element only. it is demonstrated in the following code block:
public override void TouchesMoved (NSSet touches, UIEvent evt)
{
base.TouchesEnded(touches, evt);
Console.WriteLine(touches.Count);
}
it always print 1. which means it only contains only one element.
Sincerely yours, Peyman Mortazavi
解決
I myself got it.
you need to enable multiple touch in the panel which is receiving touches.
lets suppose myPanel is the case.
myPanel.MultipleTouchEnabled = true;
Regards, S. Peyman Mortazavi
所属していません StackOverflow