美文网首页
OC(二十):自定义 Framework创建及使用(续)-打包图

OC(二十):自定义 Framework创建及使用(续)-打包图

作者: IMSong | 来源:发表于2017-07-18 20:51 被阅读29次

1,创建bundle

1.png

2,命名bundle

2.png

3,添加相关的资源

3.png

4,5,6 修改 bundle 的相关设置,必须要

4.png
5.png
6.png

7,将 framework 和 bundle 联系起来

7.png

8,真机编译生成相应的文件

8.png

9,工程引用的方法

9.png

注意:
引用图片的写法:

[tmpCancelBtn setBackgroundImage:[UIImage imageNamed:@"SToolsFrameworkBundle.bundle/line"] forState:UIControlStateNormal];

引用 xib的方法:

NSBundle *bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"bundle名" ofType:@"bundle"]];
return [super initWithNibName:NSStringFromClass([self class]) bundle:bundle];

相关文章

网友评论

      本文标题:OC(二十):自定义 Framework创建及使用(续)-打包图

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