Hello!
I'm creating an iPhone application. I have two view controllers (the main one and an about window). In the about view controller i have a UIButton which is linking to a IBAction in the view controller.
I'm getting:
2010-08-05 21:40:05.741 appname[9151:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[aboutViewController gotoMain2]: unrecognized selector sent to instance 0x5c09950'
Heres the code:
//
// aboutAboutViewController.h
//
// Created by **** on 5/08/10.
// Copyright 2010 ***. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface AboutViewController : UIViewController {
}
- (IBAction)gotoMain2;
@end
And the .m file:
//
// AboutViewController.m
//
// Created by **** on 5/08/10.
// Copyright 2010 ****. All rights reserved.
//
#import "AboutViewController.h"
@implementation AboutViewController
- (IBAction)gotoMain2 {
[self dismissModalViewControllerAnimated:TRUE];
}
@end
I'm 100% sure that everything is linked up correctly in xCode and Interface Builder
Any help is greatly appreciated
Thanks. Daniel
UPDATE: I found out just now that its trying to point to a different class.. But its correct in IB???