UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRect:_bgView.bounds]; _bgView.layer.masksToBounds = NO; _bgView.layer.shadowColor = [UIColor blackColor].CGColor; _bgView.layer.shadowOffset = CGSizeMake(0.0f, 0.0f); _bgView.layer.shadowOpacity = 1.0f; _bgView.layer.shadowRadius = 2.5f; _bgView.layer.shadowPath = shadowPath.CGPath;