Skip to content

SHARON-iOS/SwiftUI-Demo

Repository files navigation

SwiftUI-Demo

SwiftUI & Simple UI Testing tutorial

SwiftUI

Sample code for below

  1. Button
  2. Label
  3. TextField
  4. Slider
  5. List(Table)
  6. Map
  7. Picker

Screenshots

sreen1 | sreen1 | sreen1

Screenshots

Swift code 

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)

Or

            .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)
    }
    ```

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages