1 @implementation ICSDropShadowView 2 3 - (void)drawRect:(CGRect)rect 4 { 5 self.layer.shadowOffset = CGSizeZero; 6 self.layer.shadowOpacity = 0.7f; 7 8 UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRect:self.bounds]; 9 self.layer.shadowPath = shadowPath.CGPath; 10 }
设置阴影效果
时间: 2024-10-12 03:34:06