Post

Replies

Boosts

Views

Activity

Reply to Save/Print encoded data to Json (pretty printed)
Does this help… let encoder = JSONEncoder()     encoder.outputFormatting = .prettyPrinted     do {         let data = try encoder.encode(user) //convert user to json data here         print(String(data: data, encoding: .utf8)!) //print to console     } catch {         print("fail")     }
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to Check if running in preview mode?
This is hacky but maybe you could check the size of your root view since running is full screen and the previews are inset.
Replies
Boosts
Views
Activity
Feb ’22
Reply to Graphing playground (Swift 5)
I have a copy of that but don’t know how to share it. It looks like I’d have to email it or through Discord. This forum isn’t letting me select the project file to attach here.
Replies
Boosts
Views
Activity
Feb ’22