SheetPresentationController继承自UIPresentationController,声明了如下属性:
/// 背景视觉效果,nil 时背景完全透明;默认 iOS 26+ 使用开启了交互动效的 UIGlassEffect,低版本使用 systemMaterial 模糊。
open var backgroundEffect: UIVisualEffect? = nil {
didSet {
dropShadowView?.backgroundEffect = backgroundEffect
}
}
但UIPresentationController已经有了backgroundEffect属性,是iOS 26.1新增的属性
@available(iOS 26.1, *)
open var backgroundEffect: UIVisualEffect?
可以使用最新的Xcode 26.3编译试试
SheetPresentationController继承自UIPresentationController,声明了如下属性:
但UIPresentationController已经有了backgroundEffect属性,是iOS 26.1新增的属性
可以使用最新的Xcode 26.3编译试试