DynamicBlurView is a dynamic and high performance UIView subclass for Blur.
-
Since using the CADisplayLink, it is a high performance.
-
UIToolbar does not use.
-
Can generate a plurality of BlurView.
- Swift 2.3
- iOS 7.0 or later
Add the following to your Podfile
:
pod "DynamicBlurView"
use_frameworks!
Note: the use_frameworks!
is required for pods made in Swift.
Add the following to your Cartfile
:
github "KyoheiG3/DynamicBlurView"
Just add everything in the DynamicBlurView.swift
file to your project.
If target is ios8.0 or later, please import the DynamicBlurView
.
import DynamicBlurView
Blur the whole
let blurView = DynamicBlurView(frame: view.bounds)
blurView.blurRadius = 10
view.addSubview(blurView)
Animation
UIView.animateWithDuration(0.5) {
blurView.blurRadius = 30
}
var blurRadius: CGFloat
- Strength of the blur.
var dynamicMode: DynamicBlurView.DynamicMode
- Mode for update frequency.
Common
is constantly updated.Tracking
is only during scrolling update.None
is not update.
var blendColor: UIColor?
- Blend in the blurred image.
var iterations: Int
- Number of times for blur.
- Default is 3.
var fullScreenCapture: Bool
- Please be on true if the if Layer is not captured. Such as UINavigationBar and UIToolbar. Can be used only with DynamicMode.None.
- Default is false.
var blurRatio: CGFloat
- Ratio of radius.
- Defauot is 1.
func refresh()
- Get blur image again. for DynamicMode.None
func remove()
- Delete blur image. for DynamicMode.None
- Inspired by FXBlurView in nicklockwood.
Under the MIT license. See LICENSE file for details.