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
该法典:
//
// 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
非常感谢任何帮助。
Thanks. Daniel
UPDATE:我刚刚发现,它试图指出一个不同的阶层。 但它在IB中的正确性?