plist在字典里面写数据 [英] plist writing data inside dictionary
本文介绍了plist在字典里面写数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以通过代码在bundle或我们的资源中编辑pList文件中的值?这意味着我的plist文件不是以编程方式创建的,我想以编程方式编辑它的值。
Is it possible to edit values in our pList file in bundle or in our resources through code? This means that my plist file is NOT created programmatically and I want to edit its values programmatically.
推荐答案
在你的应用包中,没有:您无法在应用程序包中写入文件。
In your app bundle, no: you can't write files inside your app bundle.
但是,您可以在首次启动时将文件复制到应用程序沙箱的Documents或Library目录中应用程序,然后从那里编辑plist文件 - 它是由代码或手工创建的并不重要。
However, you can copy the file to the Documents or Library directory of the app sandbox upon the first launch on your app, then edit the plist file from there -- wheter it was created by code or by hand is unimportant.
这篇关于plist在字典里面写数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文