iOS Swift - User Input and Forms
You want a Stepper that starts at 10, goes up to 50, and increases by 5 each tap. Which code correctly sets this behavior?
step: parameter. The range uses in:.value: $count, in: 10...50, and step: 5. Stepper(value: $count, range: 10...50, step: 5) { Text("Count: \(count)") } uses wrong parameter range. Stepper(value: $count, in: 10...50) { Text("Count: \(count)") } misses step size. Stepper(value: $count, in: 10...50, step: 10) { Text("Count: \(count)") } uses wrong step size 10.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions