Error “Geometry action is cycling between duplicate values.”
The following code worked just fine as expected until I threw in an additional Text
views write below the Toggle
(it is commented out in the code below). When I do that I get a Geometry action is cycling between duplicate values. error and the program eventually hangs (on X86 15.2). It does not really hang but seems stuck in some infinite update loop consuming a 100% of a core and eating up RAM. Same error on M3 15.1 except haven’t been able to make it hang/get stuck yet.
SwiftUI pattern for handling independent events/triggers in self-contained Views?
I have a View
which is self-contained, in that it handles its own state.
Custom accessibility VoiceOver identifier on ActionSheet in SwiftUI is not working
import SwiftUI struct ContentView: View { @State private var showingConfirmationDialog = false @State private var options = [“Option 1”, “Option 2”, “Option 3”] var body: some View { Button(“Show Options”) { showingConfirmationDialog = true } .confirmationDialog(“Choose an Option”, isPresented: $showingConfirmationDialog, titleVisibility: .visible) { ForEach(options, id: .self) { option in Button(option) { print(“(option) selected”) } .accessibilityLabel(option) […]
Custom accessibility VoiceOver identifier on ActionSheet in SwiftUI is not working
import SwiftUI struct ContentView: View { @State private var showingConfirmationDialog = false @State private var options = [“Option 1”, “Option 2”, “Option 3”] var body: some View { Button(“Show Options”) { showingConfirmationDialog = true } .confirmationDialog(“Choose an Option”, isPresented: $showingConfirmationDialog, titleVisibility: .visible) { ForEach(options, id: .self) { option in Button(option) { print(“(option) selected”) } .accessibilityLabel(option) […]
Custom accessibility VoiceOver identifier on ActionSheet in SwiftUI is not working
import SwiftUI struct ContentView: View { @State private var showingConfirmationDialog = false @State private var options = [“Option 1”, “Option 2”, “Option 3”] var body: some View { Button(“Show Options”) { showingConfirmationDialog = true } .confirmationDialog(“Choose an Option”, isPresented: $showingConfirmationDialog, titleVisibility: .visible) { ForEach(options, id: .self) { option in Button(option) { print(“(option) selected”) } .accessibilityLabel(option) […]
Custom accessibility VoiceOver identifier on ActionSheet in SwiftUI is not working
import SwiftUI struct ContentView: View { @State private var showingConfirmationDialog = false @State private var options = [“Option 1”, “Option 2”, “Option 3”] var body: some View { Button(“Show Options”) { showingConfirmationDialog = true } .confirmationDialog(“Choose an Option”, isPresented: $showingConfirmationDialog, titleVisibility: .visible) { ForEach(options, id: .self) { option in Button(option) { print(“(option) selected”) } .accessibilityLabel(option) […]
Returning a String value from a Task sync or async
I am trying to put all my database operations to the background.
For on function I need to get a setting back.
Using a State property to create a view in a sheet
I am trying to create a view in SwiftUI where by clicking on a button, a sheet is presented. A simplified version of the code looks like this:
Custom ShapeStyle dependent on resulting frame
I am trying to provide a custom shape style to have a unified look across my app. The problem is that my shape style depends on the resulting frame of the view:
Custom ShapeStyle dependent on resulting frame
I am trying to provide a custom shape style to have a unified look across my app. The problem is that my shape style depends on the resulting frame of the view: