Post

Replies

Boosts

Views

Activity

Reply to GeometryReader problem
Without seeing your code we can only speculate: It could be possible that the size is reported as beeing zero for a short period. Change your code to prevent using a size of zero and see if that solves the problem.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’24
Reply to Swift Playgrounds .environmentObject error CreatureZoo()
You have to create the environment object at the top level of your hierarchy and inject it into your topmost view using .environmentObject(yourEnvironmentObject), where yourEnvironmentObject ist the object you created. See the following article: https://www.hackingwithswift.com/quick-start/swiftui/how-to-use-environmentobject-to-share-data-between-views
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’22