objective 修改plist文件
2012-04-18 16:58
141 查看
修改plist文件 首先必须保证plist文件存在于Library 或者Documents中 建议把plist文件放在Library/Caches中
(问过高手,放在这两个文件中有啥区别,高手说 苹果官方审查制度规定 最好把文件放在Library/Caches 中 ,否则苹果会不允许你的APP上架销售)
(问过高手,放在这两个文件中有啥区别,高手说 苹果官方审查制度规定 最好把文件放在Library/Caches 中 ,否则苹果会不允许你的APP上架销售)
NSString *documentPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches"]; tempstr = [documentPath stringByAppendingPathComponent:@"menu.plist"]; self.dictionary = [NSMutableDictionary dictionaryWithContentsOfFile:tempstr];//字典必须定义成可变字典 [dictionary setValue:@"dfadf" forKey:@"test"];//更改内容 [dictionary writeToFile:tempstr atomically:YES];//保存更改
相关文章推荐
- 动态映射objective-c的对象方法修改空指针
- Objective-C 【OC语法:不能修改 某个对象的 结构体属性的 成员】
- NSString 不可修改字符串 -Objective-C
- Xcode_7 iOS_9 修改单元格_移动单元格 Objective-C (13)
- NSMutableString 可修改字符串-Objective-C
- objective-c 项目模版修改
- Objective-C 利用OC的消息机制,使用Method Swizzling进行方法修改
- objective-c的NSMutableDictionary对象数据修改测试
- NSMutableString 可修改字符串-Objective-C
- Xcode下修改plist文件
- Objective-C实现修改和删除nsstring 的方法
- Objective-C修改cell左滑按钮背景色
- NSString 不可修改字符串 -Objective-C
- Objective-C修改运动步数
- Objective-C设置修改对象属性方法总结
- 修改SQL Server2005数据库中的逻辑文件名
- C#附加数据库算法及思路,包括附加、还原、备份、分离、压缩、创建、修改等常见操作(修正)
- dedecms5.5修改"Dedecms提示信息"的最详细解决方法
- C#调用Win32 API,实现简单的IP地址修改
- Internet Explorer已对此页面进行了修改,以帮助阻止跨站脚本解决