• 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: Intercepting events from a control
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intercepting events from a control


  • Subject: Re: Intercepting events from a control
  • From: Dave DeLong <email@hidden>
  • Date: Tue, 10 Mar 2009 13:52:28 -0600

Subclassing isn't always an option (For example, NSButton is a class cluster).

I've done something like this for iPhone, where I've embedded the control in a UIView, then set userInteractionEnabled to NO on the control, so that the tap events would fall through to the UIView underneath. The UIView handles the events how it needs to, then passes the taps back to the control for proper visual behavior.

I'm not sure how that would translate to the Mac, but maybe it helps you. =)

Cheers,

Dave

On Mar 10, 2009, at 1:47 PM, Kyle Sluder wrote:

On Tue, Mar 10, 2009 at 3:43 PM, David Alter <email@hidden > wrote:
Is there a way to do this?

Subclass the control and override -mouseDown:, -mouseUp:, -becomeFirstResponder, and -resignFirstResponder? Seems straightforward to me.

--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

_______________________________________________

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: Intercepting events from a control
      • From: "Paul Sanders" <email@hidden>
References: 
 >Intercepting events from a control (From: David Alter <email@hidden>)
 >Re: Intercepting events from a control (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Intercepting events from a control
  • Next by Date: [MEET] LA CocoaHeads 3/12/09 at 7:30pm
  • Previous by thread: Re: Intercepting events from a control
  • Next by thread: Re: Intercepting events from a control
  • Index(es):
    • Date
    • Thread