• 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: Adding an NSButton to a layer-hosted view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding an NSButton to a layer-hosted view


  • Subject: Re: Adding an NSButton to a layer-hosted view
  • From: Michel Schinz <email@hidden>
  • Date: Fri, 14 Nov 2008 19:33:43 +0100

Le 14 nov. 08 à 18:04, David Duncan a écrit :

AppKit doesn't do hit testing via the layer tree, so by moving the button's layer, you've desynchronized the graphical location of the button with the hit test location of the button. If you want to use layer-backed AppKit views, you always need to move them via AppKit for the graphical and logical locations to match.

That was the problem indeed, thanks a lot David! Moving the button using setFrameOrigin: makes it behave correctly.


I'll also conclude from your answer that putting these NSControl instances in my layer-hosted view is legal. Please correct me if I'm wrong.

Michel._______________________________________________

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: Adding an NSButton to a layer-hosted view
      • From: David Duncan <email@hidden>
References: 
 >Adding an NSButton to a layer-hosted view (From: Michel Schinz <email@hidden>)
 >Re: Adding an NSButton to a layer-hosted view (From: David Duncan <email@hidden>)

  • Prev by Date: Unable to generate a PDF from textual data
  • Next by Date: Re: Unable to generate a PDF from textual data
  • Previous by thread: Re: Adding an NSButton to a layer-hosted view
  • Next by thread: Re: Adding an NSButton to a layer-hosted view
  • Index(es):
    • Date
    • Thread