On 26 Jun, 2014, at 8:15 am, Rick Mann <rm...@latencyzero.com> wrote:
> > On Jun 25, 2014, at 17:10 , Roland King <r...@rols.org> wrote: > >> If there's a UIViewController somewhere, it's in the responder chain. I >> would expect the UIButton, when hooked up in IB, just walks up that looking >> for the view controller. > > So that brings up an unanswered question from yesterday. How can I > programmatically send a message to the first responder? > > You can't, well you can, if your message looks like an action or can be made to look like an action you can use UIApplication sendAction:to:from:forEvent, with 'to' as nil and off it goes up the chain. So you should be able, if you wanted, to implement your own selector in the UIViewController subclass which has the signature of an action message and call it with that UIApplication method and the responder chain will find it for you. My bug requesting that the current firstResponder be made available as a property on UIApplication remains duped and open after 3 years. _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com