I have a UIView which I want to have a shadow and round corners.
The problem is - a shadow requires masksToBounds = NO
while round corners requires masksToBounds = YES
.
The solution I found is to have a container which will have shadow and add my UIView as a subview of the container - and give it rounded corners.
This works. I have both shadow AND round corners - but it's no good. The shadow is of a rectangle view and my image has rounded corners.
How can I implement a shadow for the rounded corners?