美文网首页
NSBundle一

NSBundle一

作者: 写代码的小书童 | 来源:发表于2019-07-12 23:24 被阅读0次

bundle 搜索资源的时候考虑大小写。 指定所需资源的名称的时候不要包含这些修辞符(@2x\@3x\_ipone\~ipad)

objc 分为 mainBundle、 allFrameworks 、allBundles

创建和初始化 NSbundle  url 、path、class 、identifier

+ bundleWithURL:

+ bundleWithPath:

+ bundleForClass:

+ bundleWithIdentifier:

- initWithURL:

- initWithPath:

加载NIB文件

-(NSArray*)loadNibNamed:(NSString*)name 

                    owner:(id)owner 

                  options:(NSDictionary<UINibOptionsKey,id> *)options;

-(BOOL)loadNibNamed:(NSNibName)nibName 

               owner:(id)owner 

     topLevelObjects:(NSArray* _Nullable *)topLevelObjects;

查找资源文件

相关文章

网友评论

      本文标题:NSBundle一

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