Skip to content

Instantly share code, notes, and snippets.

@jacobsapps
Created June 24, 2026 10:13
Show Gist options
  • Select an option

  • Save jacobsapps/bbada7d23e74b87042bb77ef8b4fe29f to your computer and use it in GitHub Desktop.

Select an option

Save jacobsapps/bbada7d23e74b87042bb77ef8b4fe29f to your computer and use it in GitHub Desktop.
ProgressiveBlurView from My top 3 design “Kisses” I like to add to every app
func makeUIView(context: Context) -> UIVisualEffectView {
let view = UIVisualEffectView(effect: UIBlurEffect(style: .light))
let filter = (NSClassFromString("CAFilter") as! NSObject.Type)
.perform(NSSelectorFromString("filterWithType:"), with: "variableBlur")!
.takeUnretainedValue() as! NSObject
filter.setValue(20, forKey: "inputRadius")
view.subviews.first?.layer.filters = [filter]
return view
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment