UIView PageOpen sample project
After I posted Creating a UIButton with a page open animation I got some requests for a sample project. I’ve been a bit busy, but I finally managed to set up a simple project. Below is a screencap of the sample App:
The App is really simple: click the “Turn Image Open” button and the image above animates open like a door. If you click the button again while the animation is in progress, the animation starts immediately over. When the animation finishes, the image is hidden from view. I made some changes to the original code, which was made for UIButtons: now the code works for all UIView objects, you simply call
- (void) pageOpenView:(UIView *)viewToOpen duration:(NSTimeInterval)duration;
and pass pass the UIView you want to animate to the method with the duration of the animation you want. That’s it, I hope this helps you! Download the sample project here PageOpenAnimationTutorial.zip.