Shadow offset - y direction is now reversed


#1

Hi all,

In working through the UIView and Hypnosister last night, I noticed that my shadow didn’t look quite right. Some digging on Apple forums indicates that the recent SDKs and OS (3.2+, I think) have changed the behavior. In short, the y axis is now reversed when drawing shadows in this fashion.

So the (4, -3) for the shadowed text in the code sample should be (4, 3) to have the shadow appear down and to the right of the original text. I observed this with BaseSDK 4.0, but I think it applies in 3.2 as well.

Note that Apple’s SDK docs are also wrong; they have not yet been updated to match this behavior.

I hope this helps someone, because it sure had me scratching my head! :smiley:


#2

Thanks - it makes more sense to me now given the coordinate system but that is going to be a drag for apps that need to support pre 3.2 as well.

Gareth