Skip to content

Instantly share code, notes, and snippets.

@TheImShrey
TheImShrey / UIView+BlurEffects.swift
Last active April 2, 2024 12:52
@BlurredBackground property observer
@propertyWrapper
struct BlurredBackground<Content> where Content: UIView {
var disposeBag = DisposeBag()
private let blurEffectView: UIVisualEffectView
var wrappedValue: Content {
didSet {
self.manageHierarchy()
disposeBag = DisposeBag()
self.trackHierarchy()