I recently came across an interesting article online where the original developer offered a Github repository of examples of various shadows.
I cannot now remember the website that I visited, but I remember the code offered and one needed to uncomment/comment methods in the source and build each time to see differing effects of each one. While that did indeed work, it didn’t allow for someone to easily browse the effects, the developer included.
I saw the good utility in what was ultimately being offered, but the presentation was something I found lacking and something that needed some attention. If I find the original stuff, I’ll offer up my changes to the original developer’s codebase. I’m feeling a little too lazy at the moment. You might understand that.
I have created a new Github repository of my own which includes all of my adjustments and also a line of Swift 2.2 code. Which is a new selector implementation, all shiny and new! This selector will indeed survive the ravages of a Swift 3.0 migration. The older string-based selectors will break.
https://github.com/edolecki/ShadowExampleSwift
A quick note about the new selectors (which I love for obvious reasons)… a project I am working on, when opened, gives 282 warnings. Most of them in regards to selectors or __function__ calls. So… when the rest of the team upgrades their Xcode and Swift, I can safely fix all those warnings. Secretly I am hoping when Apple offers up Swift 3.0, a little dialog will come up and magically fix all those warnings correctly.
Oh. Before I forget, here is that new selector implementation.
pageControl.addtarget(self, action: #selector(changePage(_:)), forControlEvents: .ValueChanged)
If you are fascinated by the very idea of integrating drop shadows into your work and you’d like a headstart, you might find respite in the repository that I offer which is available here. Enjoy if you can, play if you must.