• 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: How does a UIButton perform a segue?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How does a UIButton perform a segue?
      • From: Rick Mann <email@hidden>
References: 
 >How does a UIButton perform a segue? (From: Rick Mann <email@hidden>)
 >Re: How does a UIButton perform a segue? (From: Alex Zavatone <email@hidden>)
 >Re: How does a UIButton perform a segue? (From: Rick Mann <email@hidden>)
 >Re: How does a UIButton perform a segue? (From: Roland King <email@hidden>)
 >Re: How does a UIButton perform a segue? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: How does a UIButton perform a segue?
  • Next by Date: Re: How does a UIButton perform a segue?
  • Previous by thread: Re: How does a UIButton perform a segue?
  • Next by thread: Re: How does a UIButton perform a segue?
  • Index(es):
    • Date
    • Thread