I am trying to run the following code with MonoTouch:
this.TouchesBegan += delegate { txtAmount.ResignFirstResponder(); };
When I compile I get the following error:
Cannot assign to `TouchesBegan' because it is a `method group'
The API seems to support this: http://docs.xamarin.com/ios/advanced_topics/api_design
Any ideas?
I guess you’re using
UIGestureRecognizerright ?If so then `TouchesBegan’ is a method not an event so you cannot assign a delegate to it.
You might want to look at:
and the Touches_GestureRecognizers sample.