Post

Replies

Boosts

Views

Activity

Reply to SwiftUI seems to assume that no one uses optionals anymore.
Given that most of your class attributes are optional, maybe it might make more sense to use a dictionary? Dictionaries don't mind if most of your "attributes" don't exist, and for TextField you can use a default value of "" if the dictionary entry doesn't exist. In the meantime, if you're set on using optional attributes, there's this: StackOverflow
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’24