views:

323

answers:

2

I'm using the method described at http://stackoverflow.com/questions/805872/how-do-i-draw-a-shadow-under-a-uiview to draw shadow behind a view's content. The shadow is clipped to the view's bounds, although I disabled "Clip Subviews" in Interface Builder for the view. Is it possible to draw a shadow around a view and not only in a view?

I don't want to draw the shadow inside the view because the view would receive touch events for the shadow area, which really belongs to the background.

A: 

Hi,

clipsToBounds only controls the clipping for children of a view, not drawing of that view itself; hence it's not solving your problem.

If you can draw your shadow onto a different view and add that as a child, it won't get clipped. However, I don't know how possible that is with the method you're using :(

deanWombourne
A: 

Hi,

It is not encouraged to draw outside view bounds. Maybe you can include the shadow directly in your background...

Regards,

Quentin