Re: How does a UIButton perform a segue?
Re: How does a UIButton perform a segue?
- Subject: Re: How does a UIButton perform a segue?
- From: Roland King <email@hidden>
- Date: Thu, 26 Jun 2014 08:20:01 +0800
On 26 Jun, 2014, at 8:15 am, Rick Mann <email@hidden> wrote:
>
> On Jun 25, 2014, at 17:10 , Roland King <email@hidden> 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 (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