I'm pretty sure I can create a page flip effect using a series of PNGs to simulate the animation but is there a way to do it programmatically? Tried googling it and looking at Apple sample code but didn't see anything addressing that particular animation.
+5
A:
I'm assuming you mean for an iPhone, right?
From the Apple API docs for UIView:
+ (void)setAnimationTransition:(UIViewAnimationTransition)transition forView:(UIView *)view cache:(BOOL)cache
where UIViewAnimationTransition
is defined as:
typedef enum {
UIViewAnimationTransitionNone,
UIViewAnimationTransitionFlipFromLeft,
UIViewAnimationTransitionFlipFromRight
UIViewAnimationTransitionCurlUp,
UIViewAnimationTransitionCurlDown,
} UIViewAnimationTransition;
UIViewAnimationTransitionCurlUp
is what you are looking for. See those docs for information on how to start, set, and commit animations to views as well.
Marc W
2009-05-12 03:49:36
yes, just found that. thanks!
sam
2009-05-12 03:50:57
UIViewAnimationTransitionCurlUp and UIViewAnimationTransitionCurlDown are iOS 4.0 only. Also, they don't offer a left / right curl.
brianegge
2010-06-28 16:38:54
I answered this question long before iOS 4 was even being developed...
Marc W
2010-06-28 22:15:36
A:
Hay in UIViewAnimationTransitionCurlUp animation after curl up image position is still there only how to avoid that
jeeva
2010-04-15 10:26:05