• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

174
Views
Perform an action after an entry's button is pressed in SwiftEntryKit

I have added 2 buttons to my SwiftEntryKit popup but cannot figure out how to do something after a button is pressed.

I follow the pattern set with their example for alerts.

I tried entering something into the dismiss action, but it did not work:

// 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")
    }

}

Thank you.

about 3 years ago · Santiago Trujillo
1 answers
Answer question

0

You have to set entryInteraction to .absorbTouches for the attributes property of SwiftEntryKit.display.

var attributes = EKAttributes()
attributes.entryInteraction = .absorbTouches

[...]

SwiftEntryKit.display(entry: <entry variable>, using: attributes)
about 3 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error