将文本从 uitextview 保存到 plist
对于我的应用程序,我能够读取从表行中选择的地点的描述并将其显示在 uitextview 中。但我接下来需要做的是将用户在 uitextview 中编辑的内容保存到 plist。需要一些指南,因为我一直在寻找它但徒劳无功..谢谢
for my application i am able to read the description of a place selected from the table row and display it in the uitextview. but what i needed to do next is able to save content edited by user in the uitextview to plist. need some guide because i had been searching for it but in vain..thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不需要使用 plist 来存储字符串,您可以使用 -[NSString writeToFile:atomically:encoding:error:] 方法,并且只需创建一个文件。
如果您执意要创建 plist,则可以使用 NSPropertyListSerialization 类来读取和写入 plist。
You don't need to use a plist to store a string, you can use -[NSString writeToFile:atomically:encoding:error:] method, and just create a single file.
If you're dead set on creating a plist, you can use the NSPropertyListSerialization class to read and write plists.