John
John

Reputation: 5532

Delegate Method Missing Argument in MonoTouch

I'm pretty new to MonoTouch. I've got a question about a specific class that I'm trying to use, but I realize this may just be a limitation of my understanding of how the Objective-C world is translated into C#. Specifically, I'm trying to do a direct translation of Apple's Touches example into MonoTouch so I can make sure I understand how to do multitouch recognition correctly.

I'm trying to create a custom class derived from UIGestureRecognizerDelegate. This is the class which controls UIGestureRecogniser instances. I've managed to get most of it wired up correctly. However, one of the delegate methods seems to have a totally different signature in Objective-C than in MonoTouch, specifically:

Objective-C:

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer

MonoTouch:

public override bool ShouldRecognizeSimultaneously (UIGestureRecognizer otherGestureRecognizer)

As you can see, the Objective-C method takes two arguments of type UIGestureRecognizer, as it has to work with both of them; the MonoTouch one only seems to include the second of the two.

Again, I'm very happy to admit that I may have misunderstood something here - but I've looked through the documentation and forums as best I can (admittedly I don't really understand how all of this works just yet) and I couldn't see what to do here.

Any advice on how I can use this method would be greatly appreciated.

Thanks,

John

Upvotes: 0

Views: 313

Answers (1)

Geoff Norton
Geoff Norton

Reputation: 5056

This was a bug, I've fixed it in the next version of monotouch (v4).

Upvotes: 2

Related Questions