• 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: Request for guidance re. CALayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Request for guidance re. CALayer


  • Subject: Re: Request for guidance re. CALayer
  • From: Richard Charles <email@hidden>
  • Date: Wed, 07 Jan 2015 11:22:03 -0700

> On Jan 7, 2015, at 8:02 AM, Luc Van Bogaert <email@hidden> wrote:
>
> For instance, I have already been able to create and add sublayers to a layer-backed view, but it is still unclear to me how to draw graphic content in these layers.

I would start by drawing something to a single layer. You can draw using CALayer or CAOpenGLLayer. Use one of Apple’s sample code projects to get yourself up and running.

When using CALayer, subclass and override drawInContext: to draw something.

When using CAOpenGLLayer it is more difficult but basically you subclass and override drawInCGLContext:pixelFormat:forLayerTime:displayTime: to draw something.

For a “drawing application” you would most likely have a multitude of model objects drawn using a single layer.

Richard Charles
_______________________________________________

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


  • Prev by Date: Re: ARC query
  • Next by Date: Re: Request for guidance re. CALayer
  • Previous by thread: Re: ARC query
  • Next by thread: Re: Request for guidance re. CALayer
  • Index(es):
    • Date
    • Thread