Build Errors
TaimurAyaz opened this issue · 1 comments
Hey! Awesome Library!
There are a few build errors. I guess it's an iOS 8.2 thing. Anyways, here is how I fixed them:
In "DynamicBlurView.swift"
1)
Near the top
private var blurLayer: BlurLayer {
return layer as! BlurLayer
}
should be...
private var blurLayer: BlurLayer {
return layer as BlurLayer
}
2)
public override func displayLayer(layer: CALayer!)
let blurRadius: CGFloat
should be...
var blurRadius: CGFloat
3)
func blurredImage(radius: CGFloat, iterations: Int, ratio: CGFloat, blendColor: UIColor?)
let tempBuffer = malloc(tempSize)
should be...
let tempBuffer = malloc(UInt(tempSize))
4)
func blurredImage(radius: CGFloat, iterations: Int, ratio: CGFloat, blendColor: UIColor?)
let ctx = CGBitmapContextCreate(inBuffer.data, Int(inBuffer.width), Int(inBuffer.height), 8, inBuffer.rowBytes, space, bitmapInfo)
should be...
let ctx = CGBitmapContextCreate(inBuffer.data, UInt(inBuffer.width), UInt(inBuffer.height), 8, inBuffer.rowBytes, space, bitmapInfo)
5)
func blurredImage(radius: CGFloat, iterations: Int, ratio: CGFloat, blendColor: UIColor?)
CGContextFillRect(ctx, CGRect(x: 0, y: 0, width: width, height: height))
should be...
CGContextFillRect(ctx, CGRectMake(0, 0, CGFloat(width), CGFloat(height)))