1. Practical needs
Transparent Blur Effect transparent blur effect
2. The value and harvest of this article
After reading this article, you will be able to make the following interface
3. Code analysis
1. home view
import SwiftUI
struct Home: View {
/// View Properties
@State private var activePic: String = "Pic"
@State private var blurType: BlurType = .freeStyle
var body: some View {
GeometryReader {
let safeArea = $0.safeAreaInsets
ScrollView(.vertical) {
VStack(spacing: 15) {
TransparentBlurView(removeAllFilters: true)
.blur(radius: 15, opaque: blurType == .clipped)
.padding([.horizontal, .top], -30)
.frame(height: 100 + safeArea.top)