I have an irregular shaped custom button and I would like for it to animate with the curl up effect. The problem is that Xcode places my irregular shaped button in a rectangle. The button is a .png and the transparency is preserved. On the simulator when the button curls up, the whole rectangular area marked by a black background curls up with it. I was wondering how it would be possible to just have the button curve up. Is it even possible to do that? Thanks!
Share
Unfortunately is not possible. It’s an UIViewAnimation, as it says is applied to the whole UIView frame. You can make the background transparent but the shadows will be projected from the containing frame’s bounds, resulting in a very ugly effect. I’m looking for some bespoke code which can replicate the effect, but so far I have found nothing interesting.