attributes.entranceAnimation = .init(scale: .init(from: 0.9, to: 1, duration: 0.4, spring: .init(damping: 1, initialVelocity: 0)))
attributes.exitAnimation = .init(
fade: .init(from: 1, to: 0, duration: 0.2))
attributes.popBehavior = .animated(animation: .init(
fade: .init(from: 1, to: 0, duration: 0.2)))
attributes.screenBackground = .color(color: .init(light: UIColor(white: 0, alpha: 0.5), dark: UIColor(white: 0, alpha: 0.5)))
attributes.entryBackground = .clear
attributes.screenInteraction =.absorbTouches
attributes.entryInteraction = .absorbTouches
attributes.scroll = .disabled
let widthConstraint = EKAttributes.PositionConstraints.Edge.constant(value: wid)
let heightConstraint = hig == EKAttributes.PositionConstraints.Edge.constant(value: hig)
attributes.positionConstraints.size = .init(
width: widthConstraint,
height: heightConstraint)
attributes.roundCorners = .all(radius: 16)
return attributes
var attributes = EKAttributes()
attributes.position = .center
attributes.windowLevel = .normal
attributes.displayDuration = .infinity // 手动关闭
iPhone (please complete the following information):