I am trying to register a click event in my Xamarin.iOS application. I don't want to register the events in a method like this though.
http://developer.xamarin.com/recipes/ios/standard_controls/buttons/handle_clicks/
I want to register them from the storyboard and there seems to be functionality to do this.
and in my ViewController I have the following code:
public void ButtonPressed(object sender, EventArgs ea)
{
UIAlertView error = new UIAlertView("Test Title", "This is a test", null, "Ok", null);
error.Show();
}
When I run the application and press the button, I get an error in the appDelegate
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[HomeViewController ButtonPressed:]: unrecognized selector sent to instance 0x14691650
How can I register the click event?
