Created
May 21, 2012 07:22
-
-
Save guange2015/2760931 to your computer and use it in GitHub Desktop.
plist 读取与写入
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//系统 | |
NSDictionary* infoDict = [[NSBundle mainBundle] infoDictionary]; | |
NSString* version = [infoDict objectForKey:@"CFBundleVersion"]; | |
//写入 | |
NSMutableDictionary* dict = [ [ NSMutableDictionary alloc ] initWithContentsOfFile:@"/Sample.plist" ]; | |
[ dict setObject:@"Yes" forKey:@"RestartSpringBoard" ]; | |
[ dict writeToFile:@"/Sample.plist" atomically:YES ]; | |
//读取 | |
NSMutableDictionary* dict = [ [ NSMutableDictionary alloc ] initWithContentsOfFile:@"/Sample.plist" ]; | |
NSString* object = [ dict objectForKey:@"RestartSpringBoard" ]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment