加载custom bundle

NSString *resourceBundle = [[NSBundle mainBundle] pathForResource:@"Resources" ofType:@"bundle"];
NSLog(@"resourceBundle: %@", resourceBundle);
NSString *earth = [[NSBundle bundleWithPath:resourceBundle] pathForResource:@"Resource" ofType:@"jpg" inDirectory:@"Images/MoreImages"];

使用Custom bundle,访问内部的子文件夹,需要指定inDirectory参数

posted on 2019-07-02 11:04  平淡如水y  阅读(150)  评论(0编辑  收藏  举报