用户没有获取到权限的情况下弹窗提 示重新获取
This commit is contained in:
@@ -362,6 +362,50 @@ open class Entry {
|
||||
SwiftEntryKit.display(entry: view, using: attributes)
|
||||
}
|
||||
|
||||
func showUserPermissionsEntry(view:UIView,name:String? = nil) {
|
||||
var attributes = EKAttributes()
|
||||
attributes = .centerFloat
|
||||
attributes.name = name
|
||||
attributes.precedence = .override(priority: .normal, dropEnqueuedEntries: false)
|
||||
attributes.displayMode = .inferred
|
||||
attributes.displayDuration = .infinity
|
||||
attributes.screenBackground = .color(color: .clear)
|
||||
attributes.entryBackground = .color(color: .white)
|
||||
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: .constant(value: auto(280)),
|
||||
height: .constant(value: auto(130))
|
||||
)
|
||||
attributes.positionConstraints.verticalOffset = 0
|
||||
attributes.positionConstraints.safeArea = .overridden
|
||||
attributes.positionConstraints.rotation.isEnabled = false
|
||||
attributes.statusBar = .light
|
||||
SwiftEntryKit.display(entry: view, using: attributes)
|
||||
}
|
||||
|
||||
public func isCurrentlyDisplaying(entryNamed name: String? = nil) -> Bool {
|
||||
return SwiftEntryKit.isCurrentlyDisplaying(entryNamed: name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user