Post

Replies

Boosts

Views

Activity

Reply to @Environment(\.dismiss) var dismiss - Infinite loop bug.
Weirdly enough, for me it happened because I was using an array of tuples inside my View. Did you define an array of tuples anywhere? You don't even have to use the array (not that you would ever do that), but just having it in the View was enough to cause the infinite loop: struct SomeView: View { ... var sections: [(String, String)] = [ ("String 1", "value 1"), ("String 2", "value 2"), ("String 3", "value 3"), ("String 4", "value 4") ] var body: some View { ... } }
Nov ’23
Reply to Infinite loop getting "_dismiss changed"
Weirdly enough, for me it happened because I had an array of tuples inside my View. You don't even have to use the array, just having it in the View was enough to cause the infinite loop: struct SomeView: View { ... var sections: [(String, String)] = [ ("String 1", "value 1"), ("String 2", "value 2"), ("String 3", "value 3"), ("String 4", "value 4") ] var body: some View { ... } }
Nov ’23