Search code examples
iphoneobjective-cios4uicolor

How can I apply UIColor to an existing image?


I have a1.png image. I want to apply a color effect on that image. By "apply a colour" I mean a foreground color with alpha < 1. Does anyone have a solution?


Solution

  • I haven't get solution for applying UIColor to existing image.

    One alternative way is that instead of applying color to an image you can take a View and apply color to the view.

    UIColor *color = [del color];
    
    [perceptView setBackgroundColor:[color colorWithAlphaComponent:0.5]];
    
    [perceptView setNeedsDisplay];