• 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: Keep sibling view in Responder Chain
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keep sibling view in Responder Chain


  • Subject: Re: Keep sibling view in Responder Chain
  • From: Kyle Sluder <email@hidden>
  • Date: Fri, 27 Dec 2013 09:01:19 -0800

On Dec 27, 2013, at 4:52 AM, Trygve Inda <email@hidden> wrote:
>
> If a sibling of the SourceView is active, the SourceView is not in the
> responder chain and thus my menu commands are greyed out.
>
> How can I keep a sibling view in the responder chain?

This is OS X, right?

Implement -supplementalTargetForAction:sender:on a common ancestor of both your views. (The window controller would be a good place.) This method should check the selector and return the SourceView if it matches one of the ones you need to always be directed over there.

On iOS, I haven’t tried this myself, but you should be able to do the moral equivalent by overriding -targetForAction:withSender: on your view controller.

--Kyle Sluder

_______________________________________________

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


References: 
 >Keep sibling view in Responder Chain (From: Trygve Inda <email@hidden>)

  • Prev by Date: Best Practices for Code Organization
  • Next by Date: Re: Creating NSButton in Code does not set controlTint to currentControlTint
  • Previous by thread: Re: Keep sibling view in Responder Chain
  • Next by thread: Re: Keep sibling view in Responder Chain
  • Index(es):
    • Date
    • Thread