[ad_1]
I need to view a web page when the button is pressed. I need the button to blur the background and in addition overlay textual content as a substitute of simply the blurred background. I’m having hassle displaying the blurred background whereas displaying the textual content. Please have a look at my code beneath…
The place the issue is happening->>
Button {
withAnimation {
present.toggle()
}
} label: {
VStack {
ZStack {
Rectangle()
.fill(Coloration.white.opacity(0.5))
.body(maxWidth: 170, maxHeight: 60)
.cornerRadius(15)
.padding([.leading, .trailing])
Picture(systemName: "pause")
.font(.title)
.foregroundColor(.black)
}
}
}
}
.padding(.trailing, 6)
.padding(.backside)
Spacer(minLength: 65)
}
}
}.blur(radius: present ? 100 : 0)
[ad_2]
