Marco Arment on Nostr: SwiftUI's .accessibilityRepresentation { … } is fantastic! I built a custom slider ...
SwiftUI's .accessibilityRepresentation { … } is fantastic!
I built a custom slider from SwiftUI primitives (roundrects, drag gesture, etc.), and didn't have to try to match the native Slider's accessibility mechanics — I could just put a real slider in like this:
MyCustomSlider(…)
.accessibilityRepresentation {
Slider(…)
}
I built a custom slider from SwiftUI primitives (roundrects, drag gesture, etc.), and didn't have to try to match the native Slider's accessibility mechanics — I could just put a real slider in like this:
MyCustomSlider(…)
.accessibilityRepresentation {
Slider(…)
}