NSInvalidArgumentException error in button click - xamarin
xamarin, xamarin.ios
Solution
If you look at the connections for the button (in Xcode) you'll see that you've added 2 actions to the button - one called actionButtonClick and one called actnButtonClick.
In the controller, MonoTouch appears to have only added a partial method for the second action which isn't the one that is crashing.
I deleted the action called actionButtonClick (leaving actnButtonClick) and ran your sample which ran fine.
Problem
I have been following the "Hello, iPhone" tutorial available in xamarin website. I have completed all the steps now. Now, I run the application and click on the "Action 1" button I am getting this error Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[HelloWorld_iPhoneViewController actionButtonClick:]: unrecognized selector sent to instance 0xb3a5a30 How can I fix this issue ? I am using the latest versions of MonoDevelop + MonoTouch ``` static void Main (string[] args) { // if you want to use a different Application Delegate class from "AppDelegate" // you can specify it here. UIApplication.Main (args, null, "AppDelegate"); <-- HERE } ``` my code uploaded to here