iOS 给view添加阴影效果
程序员文章站
2022-05-05 12:30:50
...
UIBezierPath *shadowPath = [UIBezierPath
bezierPathWithRect:imageView.bounds];
imageView.layer.masksToBounds = NO;
imageView.layer.shadowColor = [UIColor blackColor].CGColor;
imageView.layer.shadowOffset = CGSizeMake(0.0f, 5.0f);
imageView.layer.shadowOpacity = 0.5f;
imageView.layer.shadowPath = shadowPath.CGPath;