转自:http://blog.sina.com.cn/s/blog_7b9d64af0101jmj2.html
![iOS-生成Bundle包-引入bundle-使用bundle iOS-生成Bundle包-引入bundle-使用bundle](https://i-blog.csdnimg.cn/blog_migrate/ae46ad2bbfbb04c895b89d5b50dd5710.jpeg)
![iOS-生成Bundle包-引入bundle-使用bundle iOS-生成Bundle包-引入bundle-使用bundle](https://i-blog.csdnimg.cn/blog_migrate/796a50732027e12085fd2e3da73923d1.jpeg)
![iOS-生成Bundle包-引入bundle-使用bundle iOS-生成Bundle包-引入bundle-使用bundle](https://i-blog.csdnimg.cn/blog_migrate/698854cc32d6eb26604ba6d7e5485503.jpeg)
![iOS-生成Bundle包-引入bundle-使用bundle iOS-生成Bundle包-引入bundle-使用bundle](https://i-blog.csdnimg.cn/blog_migrate/a966446717663275918ead1b2051c17a.jpeg)
NSString * bundlePath = [[ NSBundle mainBundle] pathForResource: @ "MyBundle"ofType :@ "bundle"];
NSBundle *resourceBundle = [NSBundle bundleWithPath:bundlePath];
UIViewController *vc = [[UIViewController alloc] initWithNibName:@"vc_name"bundle:resourceBundle];
UIImageView *imgView=[[UIImageView alloc] initWithFrame:CGRectMake(50, 50, 50,50)];
UIImage *image = [UIImage imageNamed:@"MyBundle.bundle/img_collect_success"];
[imgView setImage:image];
UIImageView *imgView=[[UIImageView alloc] initWithFrame:CGRectMake(50, 50, 50,50)];
NSString *imgPath= [bundlePath stringByAppendingPathCom
UIImage *image_1=[UIImage imageWithContentsOfFile:imgPath];
[imgView setImage:image_1];
#define MYBUNDLE_NAME @ "MyBundle.bundle"
#define MYBUNDLE_PATH [[[NSBundle mainBundle] resourcePath] stringByAppendingPathCom
#define MYBUNDLE [NSBundle bundleWithPath: MYBUNDLE_PATH]