SwiftUI & Simple UI Testing tutorial
Sample code for below
- Button
- Label
- TextField
- Slider
- List(Table)
- Map
- Picker
Screenshots
Screenshots
Gradient Color
.background(LinearGradient(gradient: Gradient(colors: [Color.blue, Color.green]), startPoint: .leading, endPoint: .trailing))
Stoke Layer
.stroke(LinearGradient(gradient: Gradient(colors: [Color.yellow, Color.orange]), startPoint: .leading, endPoint: .trailing), lineWidth: 4)
Shadow
.shadow(color: .gray, radius: 20.0, x: 20, y: 10)
.shadow(radius: 5.0)
NavigationView
@State private var fullScreen = false
var body: some View {
NavigationView {
Button("Toggle Full Screen") {
self.fullScreen.toggle()
}
.navigationBarTitle("Full Screen")
.navigationBarHidden(fullScreen)
}
.statusBar(hidden: fullScreen)
}
```