BlurKit 0.1.1

BlurKit 0.1.1

Maintained by touyu.



BlurKit 0.1.1

  • By
  • touyu

A lightweight library that can easily blur the view.

Features

  • Without inheritance
  • Corresponds to UIView, UIImageView, UILabel etc...
  • Adjustable blur condition
  • Lightweight

Usage

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        view.bk.addBlur(blurRadius: 0)

        UIView.animate(withDuration: 5) {
            self.view.bk.blurRadius = 5
        }
    }
}
label.bk.addBlur(blurRadius: 3, colorTint: .white, colorTintAlpha: 0.4)
imageView.bk.addBlur(blurRadius: 4, colorTint: .white, colorTintAlpha: 0.2)
view.bk.removeBlur()
view.bk.isBlurHidden = true // or false

Installation

Add this to Cartfile

github "touyu/BlurKit" ~> 0.1
$ carthage update --platform iOS

⚠️ Caution

Because BlurKit uses the Private API, please use it carefully.