正文
// // StepperPage.swift // SwiftUIDeom // // Created by zhoukang03 on 2023/3/28. // import SwiftUI struct StepperPage: View { @State var value = 0 var body: some View { VStack { Stepper(value: $value, step: 2,label: { Text("StepperValue:\(value)") }) { c in print(c) } } } } #if DEBUG struct StepperPage_Previews: PreviewProvider { static var previews: some View { StepperPage() } } #endif
示例图
标签:14,Stepper,value,SwiftUI,var,StepperPage,View From: https://www.cnblogs.com/zyzmlc/p/17265150.html