Post

Replies

Boosts

Views

Activity

Location of Big Sur Update files
I'm running the Big Sur beta on a small partition, and after downloading the beta 2 update today, my laptop suffered a kernel panic and restarted. After restarting I tried continuing with the update, but I didn't have enough free space in the partition because of the existing download of the beta. Does anyone know how I can delete that and redownload it, or point the updater to those existing files? Thanks!
7
0
12k
Jul ’20
Displaying Parsed JSON Data in SwiftUI View
I'm still new to the Swift/SwiftUI world so I apologize if this is a super beginner problem, but I've tried looking around on the internet and can't find any solutions to my problem. I've got a little program where I want to display the title and contents of an article in a SwiftUI view on macOS, using the website's API and Swift's JSONDecoder. I have a struct representing the article data returned from the API that adheres to Codable, and a manager struct that handles building the URL, performing the request and parsing the JSON. When I print the parsed contents from this struct, everything appears in the console just fine. However, it's in trying to pass these parsed contents to SwiftUI, I get messed up. In UIKit, I would handle this using a delegate from the manager struct, but I'm not exactly sure what the SwiftUI equivalent of this is. I have an instance of my manager struct in ContentView, but do I also need an instance of an article, which the manager will set? I'm assuming this also requires property wrappers, or for something to be an observable object, but I've tried some different combinations of that and nothing's work thus far. Again, sorry if this is overly basic, but if anyone has any insight, I would greatly appreciate it. (Also worth noting, I'm using the Xcode 12 beta and the new SwiftUI app, so this could just be a problem with the beta)
0
0
399
Jun ’20