【发布时间】:2020-09-23 14:32:22
【问题描述】:
我正在使用此代码创建背景模糊视图:
struct Blur: UIViewRepresentable {
let style: UIBlurEffect.Style = .systemUltraThinMaterial
func makeUIView(context: Context) -> UIVisualEffectView {
return UIVisualEffectView(effect: UIBlurEffect(style: style))
}
func updateUIView(_ uiView: UIVisualEffectView, context: Context) {
uiView.effect = UIBlurEffect(style: style)
}
}
但是,此代码返回一个带有背景模糊的常规矩形。怎么弄圆?
【问题讨论】:
-
外圆比内圆更好。