我正在编辑用Objective-C编写的iOS应用,我有一个名为Account.plist的文件,我想在某些点插入值以更新用户看到的值,理想情况下,它将清除所有值,然后插入新的。到目前为止,我还没有运气。
<dict>
<key>DefaultValue</key>
<string>01234567891</string>
<key>Key</key>
<string>telephone_number</string>
<key>Title</key>
<string>Telephone Number</string>
<key>Titles</key>
<array>
<string>01234567891</string>
<string>01234567892</string>
<string>01234567893</string>
</array>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Values</key>
<array>
<string>01234567891</string>
<string>01234567892</string>
<string>01234567893</string>
</array>
</dict>
感谢任何帮助。
我找到了一个有用的现有答案,显然该函数称为dictionaryWithContentsOfFile
。