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) } 

here before pressing stepper: first picture before pressing stepper

here after pressing stepper second picture after pressing stepper

thanks in advance.

probably connected same @ibaction 2 stepper. see below screen shot-

enter image description here


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -