之前网上关于plist读写的东西比较多,在这里我也不班门弄斧了,我只是将这个东西读写出来,好的,先上参考资料:
参考资料:http://blog.csdn.net/totogo2010/article/details/7634185
都是好同学,直接上代码:
读plist文件
NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"plist"];
NSMutableDictionary *data = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath];
写plist文件:
NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"plist"];
NSMutableDictionary *data = [[NSMutableDictionary alloc]initWithObjectsAndKeys:self->x.text,@"x",self->y.text,@"y",nil];
[data writeToFile:plistPath atomically:YES];
就这么简单,爹妈再也不用担心的我的学习了