筛选功能约束问题
This commit is contained in:
@@ -449,50 +449,51 @@ open class Entry {
|
||||
attributes.statusBar = .light
|
||||
SwiftEntryKit.display(entry: view, using: attributes)
|
||||
}
|
||||
|
||||
func showSearchEntry(view: UIView, name: String? = nil) {
|
||||
var attributes = EKAttributes()
|
||||
attributes = .bottomFloat
|
||||
attributes.name = name
|
||||
attributes.precedence = .override(priority: .min, dropEnqueuedEntries: false)
|
||||
attributes.displayMode = .inferred
|
||||
attributes.displayDuration = .infinity
|
||||
attributes.screenBackground = .color(color: .black.with(alpha: 0.3))
|
||||
attributes.entryBackground = .color(color: .clear)
|
||||
attributes.screenInteraction = .absorbTouches
|
||||
attributes.entryInteraction = .absorbTouches
|
||||
attributes.scroll = .disabled
|
||||
attributes.entranceAnimation = .init(
|
||||
translate: .init(
|
||||
duration: 0.25,
|
||||
spring: .init(damping: 1, initialVelocity: 0)
|
||||
)
|
||||
)
|
||||
attributes.exitAnimation = .init(
|
||||
translate: .init(duration: 0.25)
|
||||
)
|
||||
attributes.popBehavior = .animated(
|
||||
animation: .init(
|
||||
translate: .init(duration: 0.25)
|
||||
)
|
||||
)
|
||||
attributes.shadow = .active(
|
||||
with: .init(
|
||||
color: .black,
|
||||
opacity: 0.3,
|
||||
radius: 6
|
||||
)
|
||||
)
|
||||
attributes.positionConstraints.size = .init(
|
||||
width: .fill,
|
||||
height: .constant(value: auto(500))
|
||||
)
|
||||
attributes.positionConstraints.verticalOffset = 0
|
||||
attributes.positionConstraints.safeArea = .overridden
|
||||
attributes.positionConstraints.rotation.isEnabled = false
|
||||
attributes.statusBar = .light
|
||||
SwiftEntryKit.display(entry: view, using: attributes)
|
||||
}
|
||||
//
|
||||
// func showSearchEntry(view: UIView, name: String? = nil) {
|
||||
// var attributes = EKAttributes()
|
||||
// attributes = .topToast
|
||||
// attributes.name = name
|
||||
// attributes.precedence = .override(priority: .min, dropEnqueuedEntries: false)
|
||||
// attributes.displayMode = .inferred
|
||||
// attributes.displayDuration = .infinity
|
||||
// attributes.screenBackground = .color(color: .black.with(alpha: 0.3))
|
||||
// attributes.entryBackground = .color(color: .clear)
|
||||
// attributes.screenInteraction = .absorbTouches
|
||||
// attributes.entryInteraction = .absorbTouches
|
||||
// attributes.scroll = .disabled
|
||||
// attributes.entranceAnimation = .init(
|
||||
// translate: .init(
|
||||
// duration: 0.25,
|
||||
// spring: .init(damping: 1, initialVelocity: 0)
|
||||
// )
|
||||
// )
|
||||
// attributes.exitAnimation = .init(
|
||||
// translate: .init(duration: 0.25)
|
||||
// )
|
||||
// attributes.popBehavior = .animated(
|
||||
// animation: .init(
|
||||
// translate: .init(duration: 0.25)
|
||||
// )
|
||||
// )
|
||||
// attributes.shadow = .active(
|
||||
// with: .init(
|
||||
// color: .black,
|
||||
// opacity: 0.3,
|
||||
// radius: 6
|
||||
// )
|
||||
// )
|
||||
// attributes.positionConstraints.size = .init(
|
||||
// width: .fill,
|
||||
// height: .constant(value: auto(500))
|
||||
// )
|
||||
// attributes.positionConstraints.verticalOffset = 0
|
||||
// attributes.positionConstraints.safeArea = .empty(fillSafeArea: false)
|
||||
// attributes.positionConstraints.verticalOffset = 44 + auto(44)
|
||||
// attributes.positionConstraints.rotation.isEnabled = false
|
||||
// attributes.statusBar = .light
|
||||
// SwiftEntryKit.display(entry: view, using: attributes, presentInsideKeyWindow: true)
|
||||
// }
|
||||
|
||||
public func isCurrentlyDisplaying(entryNamed name: String? = nil) -> Bool {
|
||||
return SwiftEntryKit.isCurrentlyDisplaying(entryNamed: name)
|
||||
|
||||
Reference in New Issue
Block a user