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

2019-05-05  本文已影响0人  何以_aaa

自定义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];
上一篇 下一篇

猜你喜欢

热点阅读