mirror of
https://github.com/samsonjs/AccessibilityTalk.git
synced 2026-03-25 09:25:52 +00:00
40 lines
1.2 KiB
Swift
40 lines
1.2 KiB
Swift
//
|
|
// ContentView.swift
|
|
// AccessibilityTalk
|
|
//
|
|
// Created by Work on 2024-02-11.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct ContentView: View {
|
|
var body: some View {
|
|
NavigationStack {
|
|
Form {
|
|
Section("1. Text Sizing") {
|
|
NavigationLink("SwiftUI") { TextSizingView() }
|
|
}
|
|
Section("2. Flexible Sizing") {
|
|
NavigationLink("SwiftUI") { FlexibleSizingView() }
|
|
NavigationLink("UIKit") { FlexibleSizingUIView() }
|
|
}
|
|
Section("3. Flip Layout Axis") {
|
|
NavigationLink("SwiftUI") { FlipLayoutAxisView() }
|
|
}
|
|
Section("4. Example Form") {
|
|
NavigationLink("❌ Bad SwiftUI Form") { ExampleFormBadView() }
|
|
NavigationLink(destination: ExampleFormGoodView()) {
|
|
Text("✅ Good SwiftUI Form")
|
|
.accessibilityLabel("Good SwiftUI Form")
|
|
}
|
|
}
|
|
}
|
|
.navigationTitle("Accessibility Demo")
|
|
.navigationBarTitleDisplayMode(.inline)
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
ContentView()
|
|
}
|