Blurberry
不使用子类化的 UIVisualEffectView 的透明模糊
功能
- 基于 UIVisualEffectView
- 支持 iOS 14 和动画块
- 极安全且极容易使用
用法
只要以任何方式创建一个 UIVisualEffectView
。代码、storyboards、XIBs 等。
如下文示例通过 blur
包装器进行自定义
visualEffectView.blur.radius = 5.0
visualEffectView.blur.tintColor = .clear
别忘了设置一个 tintColor
值,否则它将默认为30%的白色,类似于 UIBlurEffect.Style.Light
安装
Cocoapods
将 Blurberry pod 添加到您的 Podfile 中
platform :ios, '10.0'
use_frameworks!
target 'BlurryApp' do
pod 'Blurberry'
end
下一步
- 支持iOS 10, 11, 12
- 支持其他平台(例如macOS)
- 删除ObjC代码或将其设为私有
- 添加管理器以检查模糊可用性和其他服务信息
- 隐藏私有API类名、方法名等
免责声明
此框架使用私有API,所以在提交到AppStore之前请牢记。
要求
- iOS 10.0+
- Swift 5