appcelerator/titanium_mobile — pull request #2996 by farfromrefug (2012-09-19 12:30:57+00:00)
Title: [TIMOB-1555] IOS:added shadowRadius, shadowColor, shadowOffset for view

(jira ticket)[https://jira.appcelerator.org/browse/TIMOB-1555]
This is my implementation of the shadow for views on ios.
A few remarks on it:

### backgroundImage ###
I had to change a lot of things related to the background image.
This is due to the borderRadius and and the maskToBounds. As a conclusion i had to use a similar approach as for the gradientLayer. There is now a backgroundImageLayer.

### maskToBounds ###
Clearly when using shadow you must use maskToBounds = NO. Yet for backgroundImage with borderRadius you need maskToBounds = YES. That s the reason why i now use a sub layer for the backgroundImage drawing. As a consequence of that i could remove maskToBounds = YES from set BorderRadius and the maskToBounds in setBackgroundImage_ method only apply to the backgroundImageLayer.

### borderRadius ###
I made a very simple change around this. I just needed to apply the borderRadius to the gradientLayer and to the backgroundImageLayer, so that borderRadius would still work with shadows (and especially maskToBounds = NO).

You can see a few example of shadows in the jira ticket comments.

Finally i did not implement shadows in android. I know we want the feature on both plateforms. Yet it seems really harder to do on android ( just seeing how deep is the integration of borders), and i just dont have the time to do so yet (my app requirement is only on iOS for now :s). So sorry for that!