I have to update the text of a UITextField in a not visible section of my UIScrollView but, when I try it, it move the scrollview to it. I don开发者_运维技巧't want this but how can I update my not visible uitextfield without move the scrollview? Thanks, Alleria
It is a little unclear what exactly you are trying to do, but I am guessing its either of these, and I am posting them below.
Declare that textField as a property. UITextField *myTextField
If you want to edit that, you can use [myTextField becomeFirstResponder]
. This will bring up a keyboard for you to type and enter details, and then you can resignFirstResponder
.
If you just want that textField to contain some text, you can just use
self.myTextField.text = @"Some Text";
精彩评论