【发布时间】:2022-09-26 15:30:38
【问题描述】:
我在滚动视图中有多个引号,以文本和背景图像的形式出现,我只想为文本而不是完整图像制作视图模糊。这是代码:-
Text(text)
.padding(.trailing, 10)
.font(.custom(AppData.shared().appFont, size: 38))
.foregroundColor(.white)
.frame(width: UIScreen.screenWidth, height: UIScreen.screenHeight)
.multilineTextAlignment(.center)
.shadow(color: .black.opacity(0.5), radius: 7)
.minimumScaleFactor(0.5)
.ignoresSafeArea()
我想模糊文本背景而不是阴影。
-
我也尝试了 .blur(radius:1) 属性,但它模糊了文本而不是文本背景..