1

Is there a way to create a full cycle using the wheel picker style ?

For example say we have this range and picker:

var numberRange = 1...24

@State private var selectedIndex = 0

   Picker(selection: self.$selectedIndex, label:Text("Numbers")) {
          ForEach(self.numberRange ,id:\.self) { number in
              Text(String(number))                                  
       }
                                                                             
                                                                  
  }.pickerStyle(WheelPickerStyle())

My goal is given the range of numbers starting from 1 to 24, after we reach 24 the wheel wouldn't come to it's stop or end of cycle but would rather continue to present the very first value again, in this case 1.

Is it possible ?

ChesterK2
  • 320
  • 3
  • 11
  • This might be helpful: [Set continuous wheel picker - SwiftUI](https://stackoverflow.com/questions/63332500/set-continuous-wheel-picker-swiftui) – pawello2222 Sep 17 '20 at 20:49

0 Answers0