zoukankan      html  css  js  c++  java
  • 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);

        }
       

  • 相关阅读:
    爬虫心得
    WSL windows子系统ubuntu18.04建设自己的乌云
    WSL windwos 子系统 ubuntu18.04安装mysql
    python 163 email 554
    Centos 安装Oracle
    JS带进度 文件 重复 自动 异步上传
    xadmin 小组件默认折叠
    grep
    sed
    awk
  • 原文地址:https://www.cnblogs.com/lidongxiao/p/4849397.html
Copyright © 2011-2022 走看看