view.layer.shadowOffset is hardcoded to CGSize.zero
allentomdude opened this issue · 2 comments
allentomdude commented
Hello, UIView.generateOuterShadow() always sets the shadow directly underneath the view, and ignores the view's layer.shadowOffset.
Line 20 of UIView.swift generateOuterShadow() currently is:
view.layer.shadowOffset = CGSize.zero
Should be updated to:
view.layer.shadowOffset = layer.shadowOffset
In order to be able to position the outer shadow horizontally or vertically. I'll be happy to submit a pull request if you'd like.
noblakit01 commented
@allentomdude Yes, please make a pull request and update shadowOffset
in generateInnerShadow
, generateEllipticalShadow
too.
Thank you.
noblakit01 commented
Fixed it, thank you man.