I have a UIButton and a UITextField,when the button is pressed the textfield\'s content string will be equal to: This is a test string
UIButton
UITextField
This is a test string
You can handle text change within UIControlEventEditingChanged event. So when you change text programmaticaly just send this event:
UIControlEventEditingChanged
textField.text = @"This is a test string"; [textField sendActionsForControlEvents:UIControlEventEditingChanged];