'NSInvalidArgumentException' UIButton IBAction Error

Posted by Graeme on Stack Overflow See other posts from Stack Overflow or by Graeme
Published on 2010-04-02T01:18:22Z Indexed on 2010/04/02 1:23 UTC
Read the original article Hit count: 471

Hi,

I have a button in a view which refuses to work. I've got in working in a blank, default view application from X-Code, but in none of my applications will it work, instead it gives me the following error.

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[UIViewController showVicInfo:]: unrecognized selector sent to instance 0x3c084f0'

The debugger isn't any help either. I've made sure that I hook up the button to the file's owner (not the other way around) as well. Below is the code for the action. And I know it's not the alert view, because the breakpoint doesn't even reach there.

about.h

    @interface about : UIViewController {

}

-(IBAction)showInfo:(id)sender;

about.m

-(IBAction)showVicInfo:(id)sender {
    UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@"No Internet Connection" message:@"You require an internet connection via WiFi or cellular network for iFirelert to work." delegate:self cancelButtonTitle:@"OK, thanks" otherButtonTitles:nil];
    [myAlert show];
    [myAlert release];
}

© Stack Overflow or respective owner

Related posts about uibutton

Related posts about ibaction