litao0621 / VisualEffectView

UIVisualEffectView subclass with tint color

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VisualEffectView

Twitter Version CI Status codebeat badge

UIVisualEffectView subclass with tint color. Applies a blurring effect to the content layered behind using UIBlurEffect.

Demo

$ pod try VisualEffectView

Installation

###CocoaPods To install with CocoaPods, simply add this in your Podfile:

use_frameworks!
pod "VisualEffectView"

###Carthage To install with Carthage, simply add this in your Cartfile:

github "efremidze/VisualEffectView"

Manually

  1. Download and drop VisualEffectView.swift in your project.
  2. Congratulations!

Usage

Create a VisualEffectView using the empty initializer.

import VisualEffectView

let visualEffectView = VisualEffectView()
addSubview(visualEffectView)

Customization

var colorTint: UIColor // tint color
var colorTintAlpha: CGFloat // tint color alpha
var blurRadius: CGFloat // blur radius
var scale: CGFloat // scale factor

Contributions

Contributions are totally welcome.

License

VisualEffectView is available under the MIT license. See the LICENSE file for more info.

Disclaimer

VisualEffectView utilizes a private UIKit API to do its magic. Use caution, submitting this code to the App Store adds the risk of being rejected!

Credits

https://github.com/collinhundley/APCustomBlurView

About

UIVisualEffectView subclass with tint color

License:MIT License


Languages

Language:Swift 77.9%Language:Ruby 13.1%Language:Objective-C 8.9%