I would like to set the shadow to my container UIView. I use this code to make it:
- (id)initWithCoder:(NSCoder*)aDecoder
{
self = [super initWithCoder:aDecoder];
if (self) {
//-> drop shadow
[self.layer setShadowColor:[UIColor blackColor].CGColor];
[self.layer setShadowOpacity:0.6];
[self.layer setShadowRadius:2.0];
[self.layer setShadowOffset:CGSizeMake(2.0, 2.0)];
}
return self;
}
This works well. But, when I use _containerView.clipsToBounds = YES;
on this container UIView, I can't see my shadow. Why?