what's the easiest way to add the value of two text fields to equal a sum to a label

前端 未结 4 1048
误落风尘
误落风尘 2021-01-29 14:17

what\'s the easiest way to add the value of two textField to equal a sum to a label.
Here are the text fields and label I am using:

@IBOutlet we         


        
4条回答
  •  星月不相逢
    2021-01-29 15:05

    Simplest one is this wether it contains text or not.

    speedLabel.text = "\(f1TextField.text)\(f2TextField.text)"
        print(speedLabel.text)
    

提交回复
热议问题