Not sure about 'two-touch move', but here's a sample 'pinch gesture' (the
only sample code i have handy).


this code adds the gesturerecognizer to an image

UIPinchGestureRecognizer pinch = new UIPinchGestureRecognizer ();

pinch.AddTarget (this, new MonoTouch.ObjCRuntime.Selector ("PinchSelector"
));

*appd.Image*.AddGestureRecognizer (pinch);


and this code does a console.writeline with the location of each touch
point.

[Export("PinchSelector")]

public void Pinch (UIGestureRecognizer sender)

{

Console.WriteLine ("handle pinch");

UIPinchGestureRecognizer pgr = (UIPinchGestureRecognizer)sender;

var liv = sender.LocationInView (sender.View);

for (int touch = 0; touch < sender.NumberOfTouches; touch++)

{

var touchPoint = sender.LocationOfTouch (touch, sender.View);

Console.WriteLine ("pinch touch {0} at {1}", touch, touchPoint);

}
}


HTH
cd


On Tue, Sep 27, 2011 at 1:03 AM, pkd2010 <[email protected]> wrote:

> Hi
>
> I know i can get the touch position using UITouch class. but i want to get
> all touches positions. i mean when a user performs a two-touch move, i
> should get the both touch positions. how is it possible?
> Any help is welcome
>
> regards,
> PK DEVELOPER
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/How-to-receive-multi-touch-positions-tp3844062p3844062.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to