• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: first responder being clobbered
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >first responder being clobbered (From: Michael Link <email@hidden>)

  • Prev by Date: Re: Transitioning to GC-supported
  • Next by Date: Re: Core Data: Undoing Cut-Paste, Drag-Drop between documents
  • Previous by thread: Re: first responder being clobbered
  • Next by thread: Core Data: Undoing Cut-Paste, Drag-Drop between documents
  • Index(es):
    • Date
    • Thread