calayer

Animating CALayer in IKImageBrowserCell

Hi, I've got a custom image browser view with IKImageBrowserCell subclass where I've added a little sign graphic that I would like to animate on some occasions. It's kind of like the "i" sign on Panic's Coda Sites view (which I'm guessing is an ImageBrowserView customized.. right?). On Coda's sites view, if you hover on a project the l...

Tips for optimizing performance when using tons of CALayer objects?

My app architecture / hierarchy looks like this: UIView UIView CALayer | CALayer | CALayer | CALayer .... (and a few hundred more) These CALayer instances represent small square dots in a dot matrix display for an fast countdown clock. I'm updating their backgroundColor as often per second as possible. Actually what I want is 60 times...

How to store CALayers for reuse?

I have a bunch of identical CALayers that I want to reuse. Often, a few of them should disappear, and then get reused in another position within the same superlayer (half a second or so later). What is the best way (performance-wise) to keep them while they have disappeared from the screen? setHidden:YES, or setOpacity:0, or removeFromS...

Why animating custom CALayer properties causes other properties to be nil during animation?

I have a custom CALayer (say CircleLayer), containing custom properties (radius and tint). The layer renders itself in its drawInContext: method. - (void)drawInContext:(CGContextRef)ctx { NSLog(@"Drawing layer, tint is %@, radius is %@", self.tint, self.radius); CGPoint centerPoint = CGPointMake(CGRectGetWidth(self.bounds)/2, C...

CATiledLayer drawInContext called after associated view is gone

I ran into an interesting iOS problem today involving a CATiledLayer. This only happend on the device - not in the simulator. My view draws in its CALayer via the drawLayer: inContext: delegate callback. This layer has a CATiledLayer-derived sublayer, which does its own drawing in an overridden drawInContext: method. Both layers are ...