简体   繁体   English

如何在xcode iphone项目中将文件添加到.plist?

[英]How to add files to .plist in xcode iphone project?

I have a txt file with values(All english words) and am parsing the values from txt file in my code. 我有一个txt与值文件(全英文单词)和我分析我的代码从txt文件中的值。 But, it takes a long time to parse. 但是,解析需要很长时间。 I want to add the the values with keys in plist. 我想用plist中的键添加值。 I don't know how to add files in plist file . 我不知道如何在plist file添加plist file Can anyone please guide me to add files into plist? 任何人都可以指导我将文件添加到plist中吗? I searched about this in Google and i got some ideas to parse the file from plist but not get the solution to add files to plist. 我在谷歌搜索了这个,我有一些想法从plist解析文件,但没有得到解决方案将文件添加到plist。 Now am having the values in txt file like this, 现在我在txt文件中有这样的值,

Apple
Samsung
Nokia
Motorola
LG
Sony
iPhone
HTC
iPad
Mac

I just imported this txt file in my xcode and parsed the txt file in a class. 我刚刚在我的xcode中导入了这个txt文件,并在类中解析了txt文件。 Now, i asked to use this txt file as property list. 现在,我要求将此txt文件用作属性列表。 How can i do this? 我怎样才能做到这一点? Please help me. 请帮我。 I don't have any more ideas on this. 我对此没有更多的想法。

Please help me. 请帮我。 Thanks in advance. 提前致谢。

Please read this question and answer. 请阅读此问题和答案。 You can get some ideas. 你可以得到一些想法。

Steps to create and edit a plist file in Xcode 在Xcode中创建和编辑plist文件的步骤

Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM