|
Sorry for the huge amount of code, but I went through one of Paul's tutorials where he used dataTaskPublisher. I don't understand how to translate to Example 2. Paul's example has one json record, the other has 10. Anyways, I appreciate any assistance anyone can provide. Paul Example:
Example 2
|
|
Using SwiftUI I have come up with something like this for example 2 In this example however I have created a class called 'NetworkCall' hence the ObservableObject and self.networkcall.fetch changes ContentView:
Networking
|
|
I got the same but using Paul's format.
|
BUILD THE ULTIMATE PORTFOLIO APP Most Swift tutorials help you solve one specific problem, but in my Ultimate Portfolio App series I show you how to get all the best practices into a single app: architecture, testing, performance, accessibility, localization, project organization, and so much more, all while building a SwiftUI app that works on iOS, macOS and watchOS.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.