I’m trying to figure out how I could create a curl or peel effect on an image in my iPad app using Core Animation, but as I’m learning the API, I only understand different ways to move, scale, and rotate the 2D image (including the 3D transformations). I’d like to accomplish this effect on small, individual layers (i.e. sprites) that have images on both sides, so as you peel back the layer, you expose the image on the backside. I also need to have control over the position and angle at which the layer peels. I’m horrible at math and was hoping someone smarter than me could help me out so long as I at least understood those basic transformations that I mentioned.
Thanks so much in advance for wisdom!
The only way in which to easily create it is through the use of UIView’s class methods as follows:
This code goes within the MyViewController.h file:
This code goes within the MyViewController.m file:
Since, in this example, the UIViewController is being created programmatically, the method “loadView” was used in order to create the view managed by the view controller and the subviews which this view will manage. I hope this helps. Cheers.