Re: Keep sibling view in Responder Chain
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