_We need your help! If you wish for this blur effect to become an officially supported API, please file a radar and duplicate FB13949531!
BlurUIKit
is an open source UI framework that exposes more of the dynamic blur capabilities of UIKit in an App Store safe way. Namely, it exposes the 'progressive blur' effect Apple has started using in system apps where underlaying content gets progressively more blurry along a gradient pattern.
- Enables the ability to add progressive blur effects to UIKit applications.
- Allows an optional 'dimming' colored gradient to add additional contrast when needed.
- Dimming and blur gradients can be configured independently.
- Highly optimized to avoid regenerating gradient mask images unless needed.
BlurUIKit
features a default configuration ready to use, but can be further modified depending on your app's needs.
// Create a new instance of `BlurUIKit`
let blurView = VariableBlurView()
// Set a tint color for the colored gradient.
blurView.dimmingTintColor = .red
// The tint color can 'overshoot' the blur view to add more gradual transition
blurView.dimmingOvershoot = .relative(fraction: 0.25)
BlurUIKit
should work with iOS 14 and above. It may work on lower versions of iOS, but this hasnt been tested.
Manual Installation
Copy the contents of the BlurUIKit
folder to your app's project folder.
CocoaPods
pod 'BlurUIKit'
Swift Package Manager
Add the following to your Package.swift
:
dependencies: [
// ...
.package(url: "https://github.com/TimOliver/BlurUIKit.git"),
],
tl;dr Yes, it should be 99.9% safe for the App Store. If your app gets rejected from this library, please open an issue.
BlurUIKit
was created by Tim Oliver as a component of iComics.
BlurUIKit
is available under the MIT license. Please see the LICENSE file for more information.