What’s the best way to add a drop shadow to my UIView
Try this: UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRect:view.bounds]; view.layer.masksToBounds = NO; view.layer.shadowColor = [UIColor blackColor].CGColor; view.layer.shadowOffset = CGSizeMake(0.0f, 5.0f); view.layer.shadowOpacity = 0.5f; view.layer.shadowPath = shadowPath.CGPath; First of all: The UIBezierPath used as shadowPath is crucial. If you don’t use it, you might not notice a difference at first, but the keen eye will observe a certain … Read more