我有一个保存taxtfield日期的例子
- (NSString *) getFilePath {
NSArray *pathArray = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
return [[pathArray objectAtIndex:0] stringByAppendingPathComponent:@"saved.plist"];
}
-(void) saveData {
NSArray *value = [[NSArray alloc] initWithObjects:[myTextField text],nil];
[value writeToFile:[self getFilePath] atomically:YES];
}
但是如何将变量的值保存在文件中?
NSInteger = record1, record2;