He agregado 2 botones a mi ventana emergente SwiftEntryKit , pero no puedo averiguar cómo hacer algo después de presionar un botón.
Sigo el patrón establecido con su ejemplo para las alertas .
Intenté ingresar algo en la acción de descartar, pero no funcionó:
// Ok Button let okButtonLabelStyle = EKProperty.LabelStyle(font: buttonFont, color: buttonColor) let okButtonLabel = EKProperty.LabelContent(text: "OK, ACCEPT", style: okButtonLabelStyle) let okButton = EKProperty.ButtonContent(label: okButtonLabel, backgroundColor: .clear, highlightedBackgroundColor: buttonColor.withAlphaComponent(0.05)) { SwiftEntryKit.dismiss { print("okButton") } }
Gracias.
Debe establecer entryInteraction
en .absorbTouches
para la propiedad de attributes
de SwiftEntryKit.display
.
var attributes = EKAttributes() attributes.entryInteraction = .absorbTouches [...] SwiftEntryKit.display(entry: <entry variable>, using: attributes)