将图片文件夹的后缀改名为:xxx.bundle
VC获得bundle中的资源
1 | NSString * bundlePath = [[ NSBundle mainBundle] pathForResource: @ "MyBundle" ofType :@ "bundle"]; |
UIImageView获得bundle中的资源
1 | UIImageView *imgView=[[UIImageView alloc] initWithFrame:CGRectMake(50, 50, 50, 50)]; |