I have a compass style needle, free to spin.
I need it to glow when it approaches a certain orientation, say 55 degrees.
I want to have NeedleView subclass UI
I experimented with a lot of approaches here.
basically I neeed two images; one glowing and one not.
then I can draw them as CALayers on top of one another, and hijack CADisplayLink, setting
glowLayer.opacity = glowFac;
dullLayer.opacity = (1 - glowFac);
I also played with fiddling around in GL shaders, passing the glow factor as a uniform, but this is a ton of code to do basically the same thing.
NB I needed to find a graphic artist to 'glow' the image
You could create the glow around the needle's image in Photoshop. Just replace the image in the app at runtime when glow is turned on.
If you use drawRect for your drawing your needle you could possible do something like this:
Is there an easy way or library available to let text glow?