Post

Replies

Boosts

Views

Activity

Reply to Question: Swiftui http request without button
I would like to have everything inside the button´s action tag done automatically without a button clicked. You can do it without a button clicked, but never automatically. You need to define when to do it. For example, if you want to do it when the view appears, you can use onAppear. Please use the Code block (icon < >) to include some code in your post.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’21
Reply to Question: Swiftui http request without button
the app starts fine but as far as the for- loop starts, there is this issue: Seems we need to go deeper into the code which you have not shown in the opening post. Generally, you should not add one more questions which is not included in the first post. You asked Swiftui http request without button, and the issue is answered. Please try changing the ForEach as follows: &#9;&#9;ForEach(0 ..< dateien.count, id: \.self) { If you have something more, you should finish this thread and start a new thread for the new topic.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’21
Reply to Question: Swiftui http request without button
not working Sorry, but not working is the worst phrase to tell what is happening. Please try to tell what's happening precisely instead of just saying not working. I cannot get any clue with only seeing the two words. And you are missing one thing: Also, you need to remove mutating from doHttpRequest().
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’21
Reply to Suggestion for a Quote of the Day App
I am wanting to call the fetch quote function every 24 hours. What code technique would you suggest? No technique, a simple strategy. On your app starting up (including getting foreground), call the API and get the latest While your app is running in the foreground, use timer and check the next update time every minute While your app is in the background or not running, do nothing. Users cannot see background apps
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’21