标签:io color os sp on bs ef size nbsp
- (UIImage *) createImageWithColor: (UIColor *) color
{
CGRect rect = CGRectMake(0.0f,0.0f,1.0f,1.0f);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context =UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [colorCGColor]);
CGContextFillRect(context, rect);
UIImage *myImage =UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return myImage;
}
标签:io color os sp on bs ef size nbsp
原文地址:http://www.cnblogs.com/wangpanpan/p/4150683.html