美文网首页
加载自定义Bundle中的资源文件

加载自定义Bundle中的资源文件

作者: 何以_aaa | 来源:发表于2019-05-05 10:37 被阅读0次

自定义Bundle路径如下,需要获取到Info.plist文件:


自定义Bundle路径.png

1.从mainbundle中获取 自定义.bundle
2.再从 自定义.bundle 中获取对应的文件

NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"IMUIInputViewAssets" ofType:@"bundle"];
NSString *path = [[NSBundle bundleWithPath:bundlePath] pathForResource:@"Info" ofType:@"plist" inDirectory:@"com.apple.emoji"];
    
NSDictionary *dic = [NSDictionary dictionaryWithContentsOfFile:path];

相关文章

网友评论

      本文标题:加载自定义Bundle中的资源文件

      本文链接:https://www.haomeiwen.com/subject/pgkcoqtx.html