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];