• 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: CALayer-hosting view and child NSView's
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayer-hosting view and child NSView's


  • Subject: Re: CALayer-hosting view and child NSView's
  • From: Scott Anguish <email@hidden>
  • Date: Thu, 1 Jul 2010 03:07:12 -0400

A layer-hosting view can’t have subviews, which is what it sounds like you want to do in the second to last paragraph.


Why can’t you just use layer-backed views? You get the controls, you can still do animation using the animation proxy and the other animation methods.

On Jun 30, 2010, at 5:27 AM, Oleg Krupnov wrote:

> Hi,
>
> I'd like to create a custom view based on Core Animation, namely, a
> layer-hosting view. In other words, I'd like to directly manipulate
> layers in my code rather than using children NSView's.
>
> The custom view is like a matrix consisting of cells. Each cell is
> represented with a separate CALayer.
>
> However, certain cells should contain standard buttons like if they
> were "child views" of those cell layers. In other words, when I move
> the cell layer, the button needs to move synchronously; when I hide
> the cell layer, the button needs to hide as well.
>
> I would like to use the standard NSButton control, to avoid
> reinventing the wheel.
>
> But if I just place the button as a first-level child view of the
> custom view, it will not be associated with its parent cell layer. I
> also cannot access and manipulate NSButton's root layer to add it as a
> sublayer to the cell layer, AFAIK.
>
> So what is the best way around?
>

_______________________________________________

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: CALayer-hosting view and child NSView's
      • From: Oleg Krupnov <email@hidden>
  • Next by Date: Re: CALayer-hosting view and child NSView's
  • Next by thread: Re: CALayer-hosting view and child NSView's
  • Index(es):
    • Date
    • Thread