Is there a way to find out what UIResponder is the current first responder, the 
one with the keyboard up? 

I have a number of editable fields, each on a cell of a table view which is in 
a UIViewController managed by a UINavigationController. There's a couple of 
other editable fields on there too, in the top bar. If the user hits the back 
button, or a button which pushes a new UIViewController on the stack or 
initiates some other view transition whilst one of those things is being 
edited, I want to make the edit commit before I leave the screen to get the 
model object in a consistent state. To do that I need to tell the first 
responder to resign, if I can figure out what it is. 

I didn't particularly want to iterate all the fields which could be onscreen or 
all the views in the hierarchy and tell them all to resign. Is there a way to 
find the current first responder? 

I did wonder about just telling the UIApplication itself to become, and then 
resign, first responder, but that doesn't feel quite right. 
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to