ZeLegolas
ZeLegolas

Reputation: 1

CGLayer from an IUView

On iPhone or iPad someone know how we can get a CGLayer (not a CALayer) from an UIView?

Regards

Upvotes: 0

Views: 906

Answers (1)

Ole Begemann
Ole Begemann

Reputation: 135548

Haven't tried this, but I would do it like this:

  1. Create the CGLayer
  2. Get the layer's context by calling CGLayerGetContext().
  3. Draw the view to the layer's graphics context with [view.layer renderInContext:].

Upvotes: 2

Related Questions