AXKit
AXKit copied to clipboard
增加快速创建纯色图片的方法
目前的方法是:
self.imageView.image = [UIImage ax_imageWithColor:axColor.theme size:self.imageView.frame.size alpha:1];
每次都要输入size和alpha很麻烦。
理想的方法应该是:
self.imageView = [UIImageView ax_imageViewWithColor:axColor.theme];
现在可以这样做:
[self.imageView ax_fillWithColor:axColor.theme];
在0.0.7及以后版本,依然可以这样,不过这两个方法成为了UIView的扩展
[self.imageView ax_fillWithColor:axColor.theme];
[self.imageView ax_fillWithRandomColor];
也就意味着所有的视图控件都可以使用这两个方法快速设置背景色。