Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加快速创建纯色图片的方法 #5

Open
xaoxuu opened this issue Apr 26, 2017 · 2 comments
Open

增加快速创建纯色图片的方法 #5

xaoxuu opened this issue Apr 26, 2017 · 2 comments

Comments

@xaoxuu
Copy link
Owner

xaoxuu commented Apr 26, 2017

目前的方法是:

self.imageView.image = [UIImage ax_imageWithColor:axColor.theme size:self.imageView.frame.size alpha:1];

每次都要输入size和alpha很麻烦。

理想的方法应该是:

self.imageView = [UIImageView ax_imageViewWithColor:axColor.theme];
@xaoxuu
Copy link
Owner Author

xaoxuu commented Apr 27, 2017

现在可以这样做:

[self.imageView ax_fillWithColor:axColor.theme];

@xaoxuu
Copy link
Owner Author

xaoxuu commented May 7, 2017

在0.0.7及以后版本,依然可以这样,不过这两个方法成为了UIView的扩展

[self.imageView ax_fillWithColor:axColor.theme];
[self.imageView ax_fillWithRandomColor];

也就意味着所有的视图控件都可以使用这两个方法快速设置背景色。

@xaoxuu xaoxuu added the help label May 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant