Any way to emulate something like this? Isn't there an API for doing something like a "Half page curl" or something?
Asked
Active
Viewed 5,826 times
3 Answers
12
controller.modalTransitionStyle = UIModalTransitionStylePartialCurl;
[self presentModalViewController:controller animated:YES];
UIModalTransitionStyle Transition styles available when presenting view controllers modally. The below are the four different transition styles. The "UIModalTransitionStylePartialCurl" is the one you're after.
typedef enum {
UIModalTransitionStyleCoverVertical,
UIModalTransitionStyleFlipHorizontal,
UIModalTransitionStyleCrossDissolve,
UIModalTransitionStylePartialCurl,
} UIModalTransitionStyle;
Apple documentations: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html
Hope this helps!

Linuxmint
- 4,716
- 11
- 44
- 64
1
Try the following. In this case Settings is a sublcass UIViewController to be presented behind the page curl. self is also a UIViewController that is being displayed an it's view will stay on top.
-(void)presentSettings{
Settings *eset = [[Settings alloc] init];
//eset.modalPresentationStyle = UIModalPresentationFullScreen;
eset.modalTransitionStyle = UIModalTransitionStylePartialCurl;
[self presentModalViewController:eset animated:YES];
}
Notice that the Curl is only available in iOS 3.2 and later.

fsaint
- 8,759
- 3
- 36
- 48
-
What does `modalPresentationStyle` do? – sudo rm -rf Dec 09 '10 at 18:18
-
1UIModalTransitionStylePartialCurl needs a fullscreen display to work and UIModalPresentationFullScreen makes sure the modal presentation is fullscreen. I believe UIModalPresentationFullScreen that is the default, thus you can ignore that line. – fsaint Dec 09 '10 at 18:23
0
I think this may be what you're looking for:
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES];
[UIView commitAnimations];

Andy Obusek
- 12,614
- 4
- 41
- 62

Oscar
- 1,025
- 2
- 15
- 25
-
I was actually looking for a HALF page curl where the top view doesn't disappear but instead stays visible. – sudo rm -rf Dec 09 '10 at 18:15