Xcode 保存文本

发布于 2024-11-04 09:57:53 字数 38 浏览 6 评论 0原文

那么,如果我关闭应用程序并再次打开它仍然存在,我如何保存标签?

How can i save a label, then, if I close the app and open again it is still there?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

ぃ双果 2024-11-11 09:57:53

如果数据是常规首选项类型数据,则可以使用 NSUserDefaults,如果用户首选项因任何原因被擦除,则不会损坏应用程序。

这取决于数据的重要性以及您需要持久保存的程度。

You can use NSUserDefaults if the data is general preferences type data that won't cripple the app if the user prefs are wiped for any reason.

It depends on how vital the data is and how permanent you need to make the persistence.

不念旧人 2024-11-11 09:57:53

我认为你能做的最好的事情就是将数据保存在文本文件中

I think the best you can do is saving your data in a textfile

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