1,创建bundle

2,命名bundle

3,添加相关的资源

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



7,将 framework 和 bundle 联系起来

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

9,工程引用的方法

注意:
引用图片的写法:
[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];
网友评论