• 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: who is currently the first responder? (iOS)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: who is currently the first responder? (iOS)


  • Subject: Re: who is currently the first responder? (iOS)
  • From: Matt Neuburg <email@hidden>
  • Date: Wed, 29 Jun 2011 08:56:24 -0700

On Wed, 29 Jun 2011 21:12:50 +0800, Roland King <email@hidden> said:
>Is there a way to find out what UIResponder is the current first responder, the one with the keyboard up?

No. I devote some space to ranting about this in my book. The app obviously *knows* who the first responder is, so why won't it tell you?

My workaround is to implement delegate methods on all my UITextFields and store a reference to the text field in an instance variable when it starts being edited. Oh, and as I warn in the book, do NOT name that instance variable "firstResponder" or your app will fall to its knees; guess how I found *that* out? :)

>I want to make the edit commit

Oh. Well, if that's your only problem, then all you have to do is call endEditing: on the superview.

m.

--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook_______________________________________________

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

  • Follow-Ups:
    • Re: who is currently the first responder? (iOS)
      • From: Roland King <email@hidden>
  • Prev by Date: RE: Fuzzy string matching
  • Next by Date: Re: who is currently the first responder? (iOS)
  • Previous by thread: who is currently the first responder? (iOS)
  • Next by thread: Re: who is currently the first responder? (iOS)
  • Index(es):
    • Date
    • Thread