I'm looking for anything that could guide me on implementing long shadows drawing on runtime using Core Graphics or other available framework in iOS SDK. The screenshot below presents how I imagine the shadows:
I have already done some research, I didn't found any libraries that could provide this or similar features. However I found that video on youtube: http://www.youtube.com/watch?v=zS7ZjFZ-0lk presenting something I would be really pleased with. Unfortunately I was unable to contact the author or get more informations about the implementation.
I have wrote some tests and achieved some results, in fact the screenshot above was taken from my test application. To make it simpler it displays png image with transparency using UIImageView, then it creates another UIImageView, inserts it below the main view and draws shadow to it. But still this is not something that could be used in real life. My approach was to draw shadow multiple times with different offset. The problem is that solution have some cons. To keep performance hight, the graphics context I am drawing to is converted to UIImage and added to the view. That makes my shadows not as dynamic as I would like them to be (applied once, are static). The second major problem with multiple shadows is that they overlap each other, so using alpha channel transparency gives poor effects. No problem when using opaque shadows (for example from black to white), but that makes my solution even less usable (because this kind of fake shadows looks good only when drawing on plain color backgrounds). Any help would be appreciated.