Drawing gradient over image in ios
How to create gradient colour look like following image programatically. When you say "apply it over the image as a gradient", do you mean as a mask (revealing the image at the top, having it fade the image to transparent at the bottom)? If that's the case, you can apply that gradient as a mask, using CAGradientLayer : CAGradientLayer *gradientMask = [CAGradientLayer layer]; gradientMask.frame = self.imageView.bounds; gradientMask.colors = @[(id)[UIColor whiteColor].CGColor, (id)[UIColor clearColor].CGColor]; self.imageView.layer.mask = gradientMask; The above does a simple vertical gradient