I want my textfield after I click done on the keyboard to move the slider. I'm not really sure how to do that though. Is there a way to do it or do I need a button?
I am trying to allow the textField I have to accept an Int that moves a slider, I can get it to work by commenting out my function that only allows values from 10 to 90.
Code Block func textFieldShouldEndEditing(_ textField: UITextField) -> Bool { // Make sure the user entered a number let num = Double(textField.text!) if num! < 10 { textField.text = "10%" } else if num! > 90 { textField.text = "90%" } else if num! >= 10 || num! <= 90 { textField.text = String(Int(num!)) + "%" } //print(num!) return true }