Re: first responder being clobbered
Re: first responder being clobbered
- Subject: Re: first responder being clobbered
- From: glenn andreas <email@hidden>
- Date: Mon, 26 Oct 2009 23:26:08 -0500
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@hidden
<http://www.gandreas.com/> wicked fun!
JSXObjC | the easy way to unite JavaScript and Objective C
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden