AKTagsInputView
AKTagsInputView copied to clipboard
Appearance customization interface needed
- replace all colored images with runtime alpha mask filling
- other color settings
here is the code to use
- (UIImage *)fillAlphaMaskWithColor:(UIColor *)color
{
UIImage *image = self;
CGRect rect = CGRectMake(0, 0, image.size.width, image.size.height);
UIGraphicsBeginImageContextWithOptions(rect.size, NO, [UIScreen mainScreen].scale);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
[color setFill];
CGContextFillRect(context, rect);
CGContextSetBlendMode(context, kCGBlendModeNormal);
[image drawInRect: rect blendMode:kCGBlendModeDestinationIn alpha:1];
UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return img;
}