I used CGContextSetShadowWithColor()Quartz on my iPhone in my code to generate a “stomped” search for text and other things (in drawRect:and drawLayer:inContext:).
It worked fine, but when running the same code with iOS 3.2 and now iOS 4.0, I noticed that the shadows are all in the opposite direction. For instance. in the following code, I set the black shadow 1 pixel above the text, which gave it a “pressed” look, and now this shadow is 1px lower than the text, giving it a standard shadow.
...
CGContextSetShadowWithColor(context, CGSizeMake(0.f, 1.f), 0.5f, shadowColor);
CGContextShowGlyphsAtPoint(context, origin.x, origin.y, glyphs, length);
...
Now I do not know if I (or was) something wrong, or whether the attitude to this setting has changed. I did not apply any transformations that could explain this to me, at least not consciously. I flipped the text matrix in one instance, but not in the other, and this behavior is consistent. Plus, I couldn't find anything about this in the SDK release notes, so it seems like it's possible. What could be the problem?
source
share