gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-28 20:18:09 24 4
gpt4 key购买 nike

我正在为 IOS 6 开发 Tableview(Master/Detail)模板,我收到以下错误:'NSInvalidArgumentException',原因:'-[DetailViewController saveAcctData:]: unrecognized selector sent to instance 0x8d25aa0'

这是我的代码:这是什么意思?任何帮助,将不胜感激。谢谢。

- (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:(带冒号)调用该方法,但您的方法实现没有冒号。

关于iphone - 'NSInvalidArgumentException' : unrecognized selector sent to instance 0x8d25aa0',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16996561/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com