Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
514 views
Welcome To Ask or Share your Answers For Others

1 Answer

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;

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...