I'm trying to create a transition/animation on a UIView that looks something like the image in the link below. It would start with a UIView that is a standard rectangle shape, the view would then animate/transition like the left side is being pushed and it rotates on the right side corner, like a door opening slightly. I'm sure this is a really easy thing to do in Core Animation, and I've tried searching for solutions, but haven't found any examples.
Here's an example of what I am trying to achieve:
What you're hoping to achieve is fairly straight-forward if you aren't worried about adding any shading or lighting to the door.
Check out this post from this forum: How do I apply a perspective transform to a UIView?
It should point you in the right direction. You'll have to play around with the actual position of the door (ie making the perspective believable) but the code here should give you a good idea of how to transform the UIView (a CALayer really).
Good luck, James
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With