I have to add an inner shadow to a UIView that has rounded corners.
I saw several answers on SO that add inner shadows to UIViews but they don't work as I want to, because they add the shadow to the whole rectangle, not accounting for the rounded corners.
See this image as an example of what I would like to achieve:
