extension UIImage{
static func imageWithColor(color:UIColor) -> UIImage?{
let rect = CGRect.init(x:
iOS -- 通过颜色来生成一个纯色图片
于 2022-03-04 10:47:49 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
extension UIImage{
static func imageWithColor(color:UIColor) -> UIImage?{
let rect = CGRect.init(x: