把UIColor(纯色值)对象转化成UIImage对象

+ (UIImage *)createImageWithColor:(UIColor *)color andSize:(CGSize)size{CGRect rect=CGRectMake(0.0f, 0.0f, size.width, size.height);UIGraphicsBeginImageContext(size);CGContextRef context = UIGraphicsGetCurrentContext();CGContextSetFillColorWithColor(context, [color CGColor]);CGContextFillRect(context, rect);UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext();UIGraphicsEndImageContext();return theImage;}

,三亚呀——赴一个蓝天碧海。只是微笑地固执自己的坚持,

把UIColor(纯色值)对象转化成UIImage对象

相关文章:

你感兴趣的文章:

标签云: