代码部分:
// 路径阴影
UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRect:self.callListBottomView.bounds];
self.callListBottomView.layer.shadowColor = [UIColor blackColor].CGColor;
self.callListBottomView.layer.cornerRadius = 5;
self.callListBottomView .layer.masksToBounds = NO;
// 阴影偏移量
self.callListBottomView.layer.shadowOffset = CGSizeMake(10.0f, 10.0f);
// 阴影的透明度
self.callListBottomView.layer.shadowOpacity = 0.8f;
// 设置阴影路径
self.callListBottomView.layer.shadowPath = shadowPath.CGPath;
效果: