转载

[iOS] VisualEffectView:参数可配置模糊效果遮罩层封装类

VisualEffectView

[iOS] VisualEffectView:参数可配置模糊效果遮罩层封装类

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

[iOS] VisualEffectView:参数可配置模糊效果遮罩层封装类

$ pod try VisualEffectView 

Installation

CocoaPods

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

use_frameworks! pod "VisualEffectView"

Carthage

To install withCarthage, 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

原文  https://github.com/efremidze/VisualEffectView
正文到此结束
Loading...