将文本从 uitextview 保存到 plist

发布于 2024-08-17 22:09:07 字数 120 浏览 1 评论 0原文

对于我的应用程序,我能够读取从表行中选择的地点的描述并将其显示在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

感情洁癖 2024-08-24 22:09:07

您不需要使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文