Aspyn
Aspyn

Reputation: 657

Present UIViewController using full page curl?

Is their a way to use a full page curl to present a UIViewController?

Upvotes: 1

Views: 2094

Answers (2)

sho
sho

Reputation: 769

I'm assuming you mean using the UIViewController presentModalViewController:animated: method. There's not a vanilla way to use a full page curl with this method.

However, you can still use the UIView transitionFromView:toView:duration:options:completion: class method (or pre-iOS 4 equivalent methods) to get the desired effect. I'll leave the modal view's dismissal and memory management up to you, but your presentation can be handled similarly to this:

OtherViewController * otherVc = [[OtherViewController alloc] initWithNibName:nil bundle:nil];

[UIView transitionFromView:self.view 
                    toView:otherVc.view 
                  duration:TRANSITION_TIME 
                   options:UIViewAnimationOptionTransitionCurlUp 
                completion:^(BOOL finished) {
                    // Do something... or not...
                }];

Upvotes: 3

Srikar Appalaraju
Srikar Appalaraju

Reputation: 73668

UIModalTransitionStylePartialCurlis what's available. Anything more or different you'll have to implement it yourself using CoreAnimation or worse OpenGL ES

Upvotes: 0

Related Questions