I'm currently using a UILabel to display some text. I'm using CALayer to give it a nice shadow. But: performance is really bad when I'm positioning (and moving) a lot of UILabel elements on the screen.
I've read in a few blogposts that setting the shadowPath of a CALayer optimizes the performance, I gave it a shot with a rounded rectangle and it actually works. So now i'm trying to figure out how to get the shadowPath for a text on a UILabel.
Somebody that has an idea? Otherwise I'll have to render my text in coregraphics I guess.
Here's an example with the shadowPath on a rectangle layer:
backgroundImage.layer.shadowOffset = CGSizeMake(0, 0);
backgroundImage.layer.shadowRadius = LIST_TITLE_VIEW_SHADOW_SIZE;
backgroundImage.layer.shadowOpacity = LIST_TITLE_VIEW_SHADOW_OPACITY;
backgroundImage.layer.shadowPath = [UIBezierPath bezierPathWithRect:backgroundImage.bounds].CGPath;