Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Partial page curl animation

I have a working transition using UIViewAnimationTransitionCurlUp however, I would like the animation to stop halfway through, much like the Maps application...Any thoughts on how to achieve this?

like image 740
rson Avatar asked Nov 05 '09 15:11

rson


1 Answers

In iOS 3.2 and later, you can give your UIViewController a UIModalTransitionStyle of UIModalTransitionStylePartialCurl. From the UIViewController reference, we see

typedef enum {
  UIModalTransitionStyleCoverVertical = 0,
  UIModalTransitionStyleFlipHorizontal,
  UIModalTransitionStyleCrossDissolve,
  UIModalTransitionStylePartialCurl,
} UIModalTransitionStyle;

So an example use case would be:

UIViewController *viewController;
// …create or retrieve your view controller…

// Note: The modalPresentationStyle must be UIModalPresentationFullScreen,
//       and the presenter must also be a full-screen view
viewController.modalPresentationStyle = UIModalPresentationFullScreen;
viewController.modalTransitionStyle = UIModalTransitionStylePartialCurl;
like image 91
tJener Avatar answered Sep 19 '22 12:09

tJener