plist文件的读取

   NSString *filePath = [[NSBundle mainBundle] pathForResource:@"cinemalist" ofType:@"plist"];
    
    NSMutableDictionary *myDic = [NSMutableDictionary dictionaryWithContentsOfFile:filePath];

    //读取plist文件
    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"cinemalist" ofType:@"plist"];
    
    NSMutableDictionary *myDic = [NSMutableDictionary dictionaryWithContentsOfFile:filePath];
    
    for (NSDictionary * dic in [[myDic objectForKey:@"result"] objectForKey:@"data"]) {
        
        //所有的title
        NSString * title = [dic objectForKey:@"cinemaName"];
        
        //所有的content
        NSString * content = [dic objectForKey:@"address"];
        
        
        NSLog(@"title = %@",title);
        NSLog(@"content = %@",content);

    }
   

posted @ 2015-09-30 15:45  木子东晓东  阅读(195)  评论(0编辑  收藏  举报