iPhone - 如何从应用程序保存用户设置? [英] iPhone - how to save user settings from application?

查看:145
本文介绍了iPhone - 如何从应用程序保存用户设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iPhone应用程序中长期记忆中保存几个变量的最简单方法是什么?



我有一个应用程序可以与不同的sqlite数据库我想从应用程序退出后保存上一个活动数据库名称,以便在用户再次输入应用程序时打开最后一个数据库。



这是一个有点不方便创建因为我只有几个变量要存储。



存储这些变量最简单的方法是什么? / p>

提前感谢。

解决方案

NSUserDefaults是这样的设置。


What is the easiest way to save a couple of variables in an iPhone application in a long-term memory?

I have an application that works with different sqlite databases and I want after exiting from an application to save last active database name in order to open last database when user enters an application again.

It's a little bit no convenient to create for this purpose a special database and store those values in it, because I have only a couple of variables to store.

What is the easiest way to store those variables?

Thank you in advance.

解决方案

NSUserDefaults is the best place for settings like this.

这篇关于iPhone - 如何从应用程序保存用户设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆