Currently I am working on a paint app for iOS. I am stuck with applying shadow effect to a particular drawn path. I have use UIBezierpath to draw paths. Is there any way to apply shadow effect on UIBezierpath?
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetStrokeColorWithColor(context, [[UIColor whiteColor] CGColor]);
CGContextSetShadowWithColor(context, CGSizeMake(0, 5), 5.0, [[UIColor blackColor]CGColor]);
CGContextDrawPath(context, kCGPathFill);
Something like this may help u..
CGContextSetShadowWithColor(context, CGSizeZero, 20, [path.color CGColor])
I think this may help you to show shadow effect
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With