I have some text that I need to add a glow to. The thing is, when adding the glow effect, I get a performance hit.
I have several animations (they happen one at a time only and are nothing fancy or complex). These are animations like changing the alpha and scale values of a UIView.
They are perfetcly smooth! However, when adding a glow with Quartz Core to a text that I have on screen, the rest of the animations stops being so smooth.
On my father's iPhone 3GS, they work great! On mine however, an iPhone 4, they get slow! Documentation warns about the retina display because of having 4x the pixels. But I really need this glow effect!
// This work good!
_timerLabel.shadowColor = [UIColor darkGrayColor];
_timerLabel.shadowOffset = CGSizeMake(0.0, 0.5);
_timerLabel.alpha = 1.0;
// This gets me a performance hit
_timerLabel.layer.shadowRadius = 3;
_timerLabel.layer.shadowOpacity = 0.3;
Is there anyway I can do this without affecting performance?
EDIT
// This does help some! But it's not there yet.. It still has a heavy FPS loss
_timerLabel.layer.shouldRasterize = YES;
Thank you!