ios – Can somebody assist me work out the best way to show an array of numbers from 0…100 in a type / picker / wheel in SwiftUI?

Im attempting to make a type in my iOS app. There’s a portion of the shape that has a wheel picker that I need to enable the consumer to scroll from 0 to 100 and choose any quantity. I copied somebody on-line on how to do that with an array of strings, however with integers I am not fairly certain.

Xcode is saying there is a matter on the road Textual content($0)

@State non-public var selectedQuantity = 0
let amount = Array(stride(from: 0, by means of: 100, by: 1))

Picker("Amount", choice: $selectedQuantity) {
         ForEach(amount, id: .self) {
                 Textual content($0) //Says "No precise matches in name to           initializer "

See also  http - How do I simulate a website-login in iOS-app?

Leave a Reply