• 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 -displayLayer:inContext: never called during frame/bounds animation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayer -displayLayer:inContext: never called during frame/bounds animation


  • Subject: Re: CALayer -displayLayer:inContext: never called during frame/bounds animation
  • From: Daniele Margutti <email@hidden>
  • Date: Tue, 11 Jun 2013 13:59:01 +0200

On 10 Jun 2013, at 16:50, David Duncan <email@hidden> wrote:


> The behavior you see is correct. Remember that the model layer (the layer you have) only sees discrete values for an animation – typically the beginning and end values. The intermediate values are generated by the Core Animation for rendering and you are not called back for them.
>
> As such needsDisplayOnBoundsChange will only cause the layer to display once when the bounds changes, and you will only get -drawLayer:inContext: called once as a result.
>
>> Is possible to force redraw of CALayer contents during bounds/frame animation?
>
> What kind of animation are you trying to produce? There are a few different ways you could do this, but you may run into performance problems from all the redrawing first


Suppose you need to draw an image inside the CALayer and adjust them when bounds of the layer changes. If displayLayer is called at the start and at the end during the animation my image is not update and draws is wrong, so I need to update draw inside as like happens with NSView’s/UIView’s drawRect: method.

_______________________________________________

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: 
 >CALayer -displayLayer:inContext: never called during frame/bounds animation (From: Daniele Margutti <email@hidden>)
 >Re: CALayer -displayLayer:inContext: never called during frame/bounds animation (From: David Duncan <email@hidden>)

  • Prev by Date: Staying on integrated GPU while using NSOpenGLView
  • Next by Date: NSManagedObjectContextObjectsDidChangeNotification confusion
  • Previous by thread: Re: CALayer -displayLayer:inContext: never called during frame/bounds animation
  • Next by thread: Re: Can't set offset of a file NSOutputStream with appending enabled
  • Index(es):
    • Date
    • Thread