[英]iPhone - Store an array of Strings?
What is the most simple and efficient way of saving an array of strings ? 保存字符串数组最简单,最有效的方法是什么? Store the Array in DISK
将阵列存储在DISK中
NSMutableArray *myMutableArray = [[NSMutableArray alloc] initWithCapacity:100];
int x = 0;
for(x=0; x<100;x++) {
[myMutableArray insertObject: [NSString stringWithFormat:@"This is NSString number %d!",x+1] atIndex:x];
}
[myMutableArray writeToFile:filePath atomically:YES];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.