Using Swift, why when pressing one UIStepper affect both steppers? -
i writing application in swift 3.0 using xcode.
i have 2 steppers on iphone , when press 1 of them, both text boxes affected. want 1 text box affected. ]
does have sender.value? how state when want 1 label affected?
here code:
//the birthdate action increase or decrease age @ibaction func birthdatestepperaction(_ sender: uistepper) { //when age stepper pressed, value sent textbox actualagelbl.text = string(sender.value) } //the weight action increase or decrease weight @ibaction func weightstepperaction(_ sender: uistepper) { //when weight stepper pressed, value sent textbox actualweightlbl.text = string(sender.value) }
thanks in advance.
Comments
Post a Comment