Xcode 保存文本
那么,如果我关闭应用程序并再次打开它仍然存在,我如何保存标签?
How can i save a label, then, if I close the app and open again it is still there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
那么,如果我关闭应用程序并再次打开它仍然存在,我如何保存标签?
How can i save a label, then, if I close the app and open again it is still there?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
如果数据是常规首选项类型数据,则可以使用 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.
我认为你能做的最好的事情就是将数据保存在文本文件中
I think the best you can do is saving your data in a textfile