iOS 给view添加阴影效果

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;  

你可能感兴趣的:(iOS 给view添加阴影效果)