我的构造函数越来越出名"unrecognized selector sent to instance"
。可能我缺少一些非常简单的东西。
- (void)viewDidLoad
{
[super viewDidLoad];
// Problem on the next line:
UserFetcher* userFetcher = [[UserFetcher alloc] initWithEmail:[self email] AndPassword:[self password]];
[userFetcher fetch];
}
UserFetcher.h
-(id)initWithEmail:(NSString*)theEmail AndPassword:(NSString*)thePassword;
-(void)fetch;
UserFetcher.m
-(id)initWithEmail:(NSString*)theEmail AndPassword:(NSString*)thePassword AndDelegate: (id<UserFetcherDelegate>)theDelegate;
{
if ([super init])
{
email = theEmail;
password = thePassword;
}
return self;
}
-(void) fetch {...}
错误
2012-07-14 22:15:12.726 Project1[38478:c07] -[UserFetcher initWithEmail:AndPassword:]: unrecognized selector sent to instance 0x7af2ff0
任何想法缺少什么?