I use this to center the text box over something appropriate:
[textField setCenter:[someObject center]]; [textField becomeFirstResponder];
It looks great, nice, and focused on an object ready to receive text. I would like the text to be generated in a certain way, therefore, in the editor of the modified handler, I revise the text and set the new text:
[textField setText:newText]
When I do this, the text box will move to its previous position before it is centered. I would like the text box to stay centered over the object.
My experience is that probably the best way to do this, i.e. move a text field and dynamically change its contents, without the need to work with various quirks. Any tips?
source share