问题描述
- Tableview报出ArgumentException
-
开发版本:IOS6正在做一个TableView模版。报错: 'NSInvalidArgumentException', reason: '-[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]; }
解决方案
在头文件中有方法的声明吗?
时间: 2024-09-18 04:26:52