Skip to content

Dismissing underlying sheet when an alert is shown #81

Answered by tgrapperon
Muhammed9991 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @Muhammed9991!
I don't find the effect particularly weird, but in any case, you can't dismiss the sheet while the alert is presented if the alert is itself anchored to the sheet's content. In other words, the alert needs the sheet content to exist. BTW, you're not cancelling when "OK" is pressed here, you're effectively calling dismiss for the sheet presentation, so the sheet being dismissed makes sense. Alerts (or confirmation dialogs) always dismiss themselves when you interact with any button.
If this is indeed the behavior that you're looking for, you can maybe add the alert besides the sheet instead of inside, as in this case, the alert will be able to exist independently of the …

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@Muhammed9991
Comment options

@Muhammed9991
Comment options

@tgrapperon
Comment options

@Muhammed9991
Comment options

@Muhammed9991
Comment options

Answer selected by Muhammed9991
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants