zoukankan      html  css  js  c++  java
  • PLIST 读写

       NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);

        NSString *path=[paths objectAtIndex:0];

        NSString *filename=[path stringByAppendingPathComponent:[path stringByAppendingString:@"faceMap_ch.plist"]];

        //NSFileManager *fM=[NSFileManager defaultManager];

            NSMutableDictionary *dic =[[NSDictionarydictionaryWithContentsOfFile:[[NSBundlemainBundle]pathForResource:@"faceMap_ch"ofType:@"plist"]]retain];

        

        

        NSMutableDictionary *ndic = [[NSMutableDictionaryalloc] init];

        NSLog(@"%d",[dic count]);

            for (int i=0; i<[dic count]; i++) {

               

            NSString *key =  [[dic  allKeys] objectAtIndex:i];

                NSString *val = [dic objectForKey:key];

                

                

                [ndic setValue:[key stringByAppendingString:@".png"] forKey:val];

            

            }

            

            

            

            

            

            

            filename=[path stringByAppendingPathComponent:@"tiezi.plist"];

            NSLog(@"%@",filename);

            [ndic writeToFile:filename atomically:YES];

  • 相关阅读:
    模糊匹配
    UPDATE SET FROM WHERE 续
    SQL SERVER 中row_number用法
    临时表和表变量
    镜像
    经典行列转换
    表记录查询最快查询方式
    NULL不是数值
    自增长值
    JSON
  • 原文地址:https://www.cnblogs.com/StevenFu/p/3087318.html
Copyright © 2011-2022 走看看