How can I change the color of the blur in a UIImage? I need a black blur and I don't know how to do it. I found another answer here in Stackoverflow (Blur UIImage to achieve effect like passcode blur of the wallpaper with swift). This answer is perfect, but the blur is light and I need it to be black. Can anyone help me? PS: The code below is the answer from the other question.
func applyBlurEffect(image: UIImage){
var imageToBlur = CIImage(image: image)
var blurfilter = CIFilter(name: "CIGaussianBlur")
blurfilter.setValue(5, forKey: kCIInputRadiusKey)
blurfilter.setValue(imageToBlur, forKey: "inputImage")
var resultImage = blurfilter.valueForKey("outputImage") as! CIImage
var blurredImage = UIImage(CIImage: resultImage)
var cropped:CIImage=resultImage.imageByCroppingToRect(CGRectMake(0, 0,imageToBlur.extent().size.width, imageToBlur.extent().size.height))
blurredImage = UIImage(CIImage: cropped)
self.backgroundImage.image = blurredImage
}