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 Why don't work URLSession in Swift Widget
i make mistake? Your getTemp() handles the asynchronous call in a bad manner and would never work even in non-widget apps. Your dig has a valid value only inside the completion handler. return dig is executed before the completion handler is invoked. (Please indent your code properly.)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’21
Reply to Can you turn off buffer overflow protections?
I've written the sample project in Xcode and it runs fine but shows a SIGABRT error. If it shows a SIGABRT error, it is not fine. You know your code causes buffer overflow, which may cause any sort of unpredictable things. What do you think is a problem testing buffer overflow and get SIGABRT? And pleas clarify how have you tested?
Jan ’21
Reply to Networking error management
I have this error when printing from line 44 of the code you send. That is the expected result when the response data is as your dataString. I don't have other setting  Then I have no clue as for now. Better re-check all the values -- url, email, password, or any other parameters if more.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’21
Reply to How do I stop 'The compiler is unable to type-check this expression in reasonable time'
OOPer's method worked! Happy to hear that. it now doesn't display correctly... You should better start a new thread. Generally, you should not include too many topics in a single thread. (If one topic is large enough, two are too many.) And a brand-new thread would get more attention from readers who want to solve issues. Please include enough code into your new thread. (If there were no missing parts in your code -- such as Launch, Rockect, rocketApiCall, apiCall, URLimageView, etc... I could pinpoint where to fix instead of telling a general method.) If you can include some testing data, it would be better.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’21
Reply to How do I stop 'The compiler is unable to type-check this expression in reasonable time'
I can't because there is a character limit Thanks for moving your code into Text Attachment. But it is hard to say something sure as many undefined symbols are preventing us to estimate the actual part causing the issue. Better try breaking up the expression into distinct sub-expressions, as suggested. You can break up the definition of body, in the same way as aboutPage. Generally, this error The compiler is unable to type-check this expression... often occurs when some type-related errors are in the code. You would be able to find where that is happening. with splitting your loooong body into sub-views.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’21