Drawing Inner Shadow Using CoreGraphics

I know you can use CGContextSetShadow to draw a shadow, but is there a way to draw an inner shadow?

+3
source share
1 answer

This means that what you draw has an internal space for viewing the shadow. I also assume that you do not want the shadow to appear outside of what you are painting.

So, clip on the outline of what you draw, and then draw with the shadow as usual.

+1
source

Source: https://habr.com/ru/post/1765340/


All Articles