文件名称:plist文件是标准的xml文件
文件大小:823B
文件格式:TXT
更新时间:2016-12-01 04:20:54
plist,xml
plist文件是标准的xml文件 A).写入plist文件:(Dictionary/Array) NSMutableDictionary* dict = [ [ NSMutableDictionary alloc ] initWithContentsOfFile:@"/Sample.plist" ]; [ dict setObject:@"Yes" forKey:@"RestartSpringBoard" ]; [ dict writeToFile:@"/Sample.plist" atomically:YES ]; B).读取plist文件: //读取工程中的plist,初始化Dictionary。 NSMutableDictionary* dict = [ [ NSMutableDictionary alloc ] initWithContentsOfFile:@"/Sample.plist" ]; NSString* object = [ dict objectForKey:@"RestartSpringBoard" ];