ios:study-note
Differences
This shows you the differences between two versions of the page.
Next revisionBoth sides next revision | |||
ios:study-note [2012/09/07 20:34] – created percy | ios:study-note [2012/09/07 20:37] – percy | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
====== iOS学习笔记 ====== | ====== iOS学习笔记 ====== | ||
+ | |||
+ | ===== NSUserDefaults ===== | ||
+ | < | ||
+ | NSString *setting=[[NSBundle mainBundle] pathForResource: | ||
+ | if (!setting) { | ||
+ | return; | ||
+ | } | ||
+ | | ||
+ | NSDictionary *dictionary=[NSDictionary dictionaryWithContentsOfFile: | ||
+ | NSArray *array = [dictionary objectForKey: | ||
+ | NSMutableDictionary *registerToDefault=[NSMutableDictionary dictionaryWithCapacity: | ||
+ | for (NSDictionary *item in array) { | ||
+ | | ||
+ | if (key) { | ||
+ | [registerToDefault setObject: | ||
+ | break; | ||
+ | } | ||
+ | } | ||
+ | | ||
+ | [[NSUserDefaults standardUserDefaults] registerDefaults: | ||
+ | </ | ||
+ | < | ||
+ | | ||
+ | NSString *title = [userDefault objectForKey: | ||
+ | |||
+ | </ | ||
/var/www/dokuwiki/wiki/data/pages/ios/study-note.txt · Last modified: 2016/05/05 13:07 by 127.0.0.1