Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
0 votes
2 answers
550 views

I have a problem: I'm trying to open a share sheet from an alert, but the share sheet just does not open. import SwiftUI struct DocumentView: View { // ... @State private var newShare: ...
minomy13's user avatar
  • 130
0 votes
1 answer
188 views

In my SwiftUI view below, I would like my alert to update with the countdown variable which controls whether or not the Proceed button is active & also shows up in the text of the alert itself. ...
Alk's user avatar
  • 5,597
1 vote
1 answer
80 views

.alert(isPresented: self.$addANoteAlert) { AlertViewPOP( isPresented: self.$addANoteAlert, title: "Alert Title", message: "This is a message.", ...
jaydev's user avatar
  • 1,653
1 vote
0 answers
97 views

So the thing I want to do is that I have an api call if it fails I show an alert with message, OK button and Retry Button. Everything is working good but when I do retry it don't shows the alert again ...
user3745635's user avatar
0 votes
0 answers
345 views

I am aware about the importance of orders of modifiers in SwiftUI. SwiftUI provides 2 special modifier interms of .alert(...) & .sheet(...). If these modifiers is attached from any down hierarchy ...
Nasir's user avatar
  • 1,899
3 votes
1 answer
917 views

I'm new to SwiftUI and I'm trying to display an alert that does only close on some conditions but not on every click on its buttons. Is that possible or does it strike against the concept of alerts? ...
Axel Herrmann's user avatar
0 votes
1 answer
290 views

I have one application in which i am making api call, in this application i want to display error if API does not return the response. When i navigate first time to the screen, it displays alert ...
iosdev1111's user avatar
  • 1,112
1 vote
1 answer
730 views

I’m trying to show alerts in a sheet in SwiftUI. I have Cancel and Save buttons on the sheet and both of them are dismissed after the action is done.If there is an error on saving, an alert is pop ...
Feyza's user avatar
  • 11
0 votes
1 answer
522 views

I'm trying to delete an object from Coredata, and I sometimes get the error Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0), and my app crashes, when I delete an object. The console ...
Cameron Delong's user avatar
7 votes
2 answers
3k views

I want to do something similar to the code below, where it shows an alert when a user taps a navigation bar item button. However the code below doesn't work, the alerts do not display. I can't add the ...
marchinram's user avatar
  • 5,918
-1 votes
1 answer
1k views

i'm trying to show a confirmation alert after you press the "Confirm" button on the first alert. Idea: You press a button and an alert pops up that asks you to cancel or confirm the action. ...
Merdis's user avatar
  • 37
4 votes
1 answer
5k views

I want an Alert with one button that runs some code. I do not want there to be a cancel button. I've only seen a way to have two buttons, with primaryButton and secondaryButton. Is there a way to do ...
Evan93's user avatar
  • 351
34 votes
5 answers
18k views

I have the following code: @State private var signoutAlert = false var body: some View { Button(action: { self.signoutAlert = true print("signout button ...
Learn2Code's user avatar
  • 2,320
5 votes
2 answers
8k views

I have a situation where I would like to recreate previous UIKit logic by displaying an Alert during a long running operation that the user cannot interact with. Previously in UIKit, it would be this ...
CodeBender's user avatar
  • 36.8k