Swift & SwiftUI
  • İçerikler
  • UI Bileşenleri
    • Text
    • Button
    • Image
    • Picker
    • SecureField
    • Stepper
    • Slider
    • TabView
    • Sheet
    • Action Sheet
    • Alert
  • Layout
    • Fill-Space-Equally
  • State & Data Flow
    • Content
    • EnvironmentObject
    • ObservableObject
    • ObservedObject
    • Binding
  • Gestures
    • TapGesture
    • DragGesture
    • MagnificationGesture
    • RotationGesture
    • LongPressGesture
    • Notes
  • Extra
    • GeometryReader
    • Timer
    • AlignmentGuide
    • PreferenceKey
  • Concurrency
    • Perform asynchronous operation
Powered by GitBook
On this page

Was this helpful?

  1. UI Bileşenleri

Stepper

Üzerinde arttırma ve azaltma aksiyonları almamıza yarayan bileşendir.

struct LabView: View {

    @State var sliderValue: Float = 0
    
    var body: some View {
        VStack(spacing: 16) {
            
            Stepper("Boundless Stepper", value: $sliderValue)
            
            Stepper(
                "Limited Stepper: -10...10",
                value: $sliderValue, 
                in: -10...10
            )
            
            Stepper(
                "Limited Stepper: -10...10 with step: 2", 
                value: $sliderValue, 
                in: -10...10, 
                step: 2
            )
            
            Text("\(sliderValue, specifier: "%.2f")").font(.largeTitle)
            
        }.padding()
    }
    
}
PreviousSecureFieldNextSlider

Last updated 5 years ago

Was this helpful?