• 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: NSView clicking through to superview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView clicking through to superview


  • Subject: Re: NSView clicking through to superview
  • From: Mike Abdullah <email@hidden>
  • Date: Mon, 28 Sep 2009 10:35:06 +0100

You want to read up on how event handling in Cocoa works. When you click, the window is sending events to your overlay view. But if that view does not handle the event itself, it forwards it on to the next view below the mouse. So, you need to override the required event handling methods in your custom view to stop them forwarding the event on.

Mike.

On 28 Sep 2009, at 03:36, PCWiz wrote:

Hi,

I have a transparent black NSView that I layer over my window using NSView's addSubview method. This works fine, but I want to make it so that all clicks are captured by the NSView, because right now I can click through to the superview underneath. I've already tried returning NO for acceptsFirstMouse and it has no effect.

Thanks
_______________________________________________

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


References: 
 >NSView clicking through to superview (From: PCWiz <email@hidden>)

  • Prev by Date: NSTokenField token color
  • Next by Date: Stopping ODQuery (OpenDirectory Framework) takes a long time (unusable)
  • Previous by thread: Re: NSView clicking through to superview
  • Next by thread: Re: NSView clicking through to superview
  • Index(es):
    • Date
    • Thread