Skip to content

Stepper

Mohammad Azmal Hossain edited this page Mar 6, 2017 · 1 revision
let customStepper = UIStepper()
customStepper.frame = CGRect(x: 110, y: 250, width: 0, height: 0)
 customStepper.wraps = true
customStepper.autorepeat = true
customStepper.maximumValue = 10
customStepper.addTarget(self, action: #selector(stepperValueChanged), for: .valueChanged)
self.view.addSubview(customStepper)
// this func put outside of stepper scope
func stepperValueChanged(sender:UIStepper!)
{
  print("It Works, Value is \(Int(sender.value).description)")
}
Clone this wiki locally