mainBundle使用

NSBundle:一个NSBundle代表一个文件夹

mainBundle可以访问软件资源包中的任何文件

   //获得mainBundle

  NSBundle *bundle = [NSBundle mainBundle];

        

    //  获得imageData.plist的全路径

    NSString *path = [bundle pathForResource:@"fileName" ofType:@"文件类型"];

posted @ 2014-05-27 14:09  Shdow_Walker  阅读(217)  评论(0编辑  收藏  举报