On Oct 26, 2009, at 10:55 PM, Michael Link wrote:

I have a custom UITableViewController that uses a custom cell that displays a text field. I have this method added to the table view controller to set the text field as first responder

- (void)viewWillAppear:(BOOL)animated
{
        [super viewWillAppear:animated];
        
MLPropertyEditingTableViewCell* __cell = (MLPropertyEditingTableViewCell*)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
        
   [__cell.textField becomeFirstResponder];
}


What if you do it in "viewDidAppear" instead of "viewWillAppear"?

Since the view technically isn't on screen yet (only that it "will be"), setting a first responder shouldn't be done then.


Glenn Andreas                      [email protected]
 <http://www.gandreas.com/> wicked fun!
JSXObjC | the easy way to unite JavaScript and Objective C




_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to