标签:
-(UIImage*)createImageWithColor: (UIColor*) color { CGRect rect=CGRectMake(0,0, 1, 1); UIGraphicsBeginImageContext(rect.size); CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetFillColorWithColor(context, [color CGColor]); CGContextFillRect(context, rect); UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return theImage; }
标签:
原文地址:http://www.cnblogs.com/fs-ios/p/5148859.html