![](https://img.haomeiwen.com/i3096256/df9d760bdf140d54.png)
如何在iOS的Cocoapod库中使用图像Assets目录?
![](https://img.haomeiwen.com/i3096256/f6b5e6f96bda8899.png)
使用规范
![](https://img.haomeiwen.com/i3096256/4f9dfdc19c3e0fbb.png)
在组件中怎么加载图片?
- (UIImage *)ev_imageNamed:(NSString *)imageName {
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
UIImage *image = [UIImage imageNamed:imageName inBundle:bundle compatibleWithTraitCollection:nil];
return image;
}
self.ivGetStore = [[UIImageView alloc] initWithImage:[self ev_imageNamed:@"icon_hykzf"]];
网友评论