I have achieved a view that looks like this —
But I want the bottom of the view to look like this —
Adding a shadow is not helping because as soon as I do maskToBounds = YES
, I get what I have in the first picture. This is the code I have so far
[self.contentView.layer setCornerRadius:3.0f];
UIColor* color = CardBorderColor; // this is a macro that defines the color
[self.contentView.layer setBorderColor:color.CGColor];
[self.contentView.layer setBorderWidth:1.0f];
[self.contentView.layer setShadowColor:color.CGColor];
[self.contentView.layer setShadowOpacity:1.0];
[self.contentView.layer setShadowRadius:3.0];
[self.contentView.layer setShadowOffset:CGSizeMake(1.0, 1.0)];
self.contentView.layer.masksToBounds = YES;