神刀安全网

[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

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » [iOS] VisualEffectView:参数可配置模糊效果遮罩层封装类

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址