简体   繁体   中英

'NSInvalidArgumentException': unrecognized selector sent to instance 0x8d25aa0'

I am working on an Tableview (Master/Detail) template for IOS 6, I am getting the following error: 'NSInvalidArgumentException', reason: '-[DetailViewController saveAcctData:]: unrecognized selector sent to instance 0x8d25aa0'

here is my code: what does this mean? Any help would be appreciated. thank you.

- (IBAction)saveAcctData {
    NSMutableArray *array = [[NSMutableArray alloc] init];

    [array addObject:AcctName.text];
    [array addObject:AcctNum.text];
    [array addObject:DayDue.text];
    [array addObject:paymnt.text];
    [array addObject:remBalance.text];

    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,YES);

    NSString *documentPath = [paths objectAtIndex:0];

    NSString *plistPath = [documentPath stringByAppendingPathComponent:@"Accounts.plist"];

    [array writeToFile:plistPath atomically: true];
}

您必须从某处调用方法saveAcctData:(带有冒号),但是您的方法实现没有冒号。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM