ios – Can somebody assist me determine find out how to show an array of numbers from 0…100 in a kind / picker / wheel in SwiftUI?


Im making an attempt to make a kind in my iOS app. There’s a portion of the shape that has a wheel picker that I wish to permit 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 positive.

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

@State personal var selectedQuantity = 0
let amount = Array(stride(from: 0, by: 100, by: 1))

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


Please enter your comment!
Please enter your name here