Search code examples
uitextfieldxcode4.3uislider

UITextField controls a UISlider to update immediately


I am using Xcode 4.3. I have a UITextField that controls the value of a UISlider. I want to make the slider update its value as soon as the text field is changed. As of now, it only updates when the return key is clicked. I have another view also controlling the value of the text field but again the slider does not update its position until the text field is clicked and the return key is pressed.

Thank you!


Solution

  • I solved this by adding the function in the viewDidAppear method. Now it works great!