I am working on a project that utilizes code from this GitHub app, TextGlowDemo
. The app basically uses the QuartzCore Framework to add a drop-shadow to a uilabel by overriding drawTextInRect and adding CGContextSetShadow
and CGContextSetShadowWithColor
to make the drop shadow look like glowing text. The program works perfectly in ios 6, but in ios7 the glow mysteriously disappears. I do not get any warnings about deprecated methods so I do not know what is going on, any ideas?
Entire project can be found here: https://github.com/andrewgleave/TextGlowDemo
here is the code that draws the glow
- (void)drawTextInRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
CGContextSetShadow(context, self.glowOffset, self.glowAmount);
CGContextSetShadowWithColor(context, self.glowOffset, self.glowAmount, glowColorRef);
[super drawTextInRect:rect];
CGContextRestoreGState(context);
}