IOS 资源文件的读取

来源:互联网 发布:linux查看所有进程命令 编辑:程序博客网 时间:2024/05/16 11:08
398503.png 

    

    NSString *plistPath = [[NSBundle mainBundlepathForResource:@"myproresources" ofType:@"plist"];

    NSDictionary *data = [[NSDictionary allocinitWithContentsOfFile:plistPath];

    myds =data;

    NSLog(@"%@", data);//直接打印数据。

    

    mainArray = [data allKeys];

     //mainArray = [NSArray arrayWithObjects:@"test1",@"test2",nil];

    subArray =  [data objectForKey:@"test1"];

    

    self.picker5.delegate=self;

    self.picker5.dataSource=self;

0 0