- (UIImage *)imageWithColor:(UIColor *)color {
CGRect rect = CGRectMake(0, 0, 60, 60);
UIGraphicsBeginImageContextWithOptions(rect.size, NO, 0); [color setFill];
UIRectFill(rect);
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();
return image;
}
No comments:
Post a Comment