iOS view添加阴影
2019-08-10 本文已影响0人
iOS门三闫
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;