The 3.0's -presentModalViewController:animated: calls the undocumented method -presentModalViewController:withTransition: as a backend, where the 2nd parameter "transition" is an integer. For official SDK there're 5 official transitions (present and dismiss count as 2): Slide up/down, Flip to left/right, and cross fade.
But -presentModalViewController:withTransition: supports a bit more:
Parameter | Transition |
---|---|
0 | None |
1 | Push from right to left |
2 | Push from left to right |
3 | Push from bottom to top |
6 | Fade |
7 | Push from top to bottom |
8 | Slide from bottom to top |
9 | Reveal from top to bottom |
10 | Flip from left to right |
11 | Flip from right to left |
This is great, I've been battling with a crashing app due to these changes. Do you know how to dismiss the modal view controller after this? It seems it won't respond to the standard dismissModalViewControllerAnimated:
ReplyDelete@Pieter:
ReplyDeletedismissModalViewControllerWithTransition: ?
For more details look here:
ReplyDeletehttp://ericasadun.com/iPhoneDocs220/interface_u_i_view_controller.html
To avoid the warnings generate categories like that:
// allow transitions between ViewControllers
@interface UIViewController(extended)
- (void)presentModalViewController:(id)fp8 withTransition:(int)fp12;
- (void)dismissModalViewControllerWithTransition:(int)fp8;
@end
I have a file called undocumented for these... ;)
Live long and prosper,
Cy
(Short update) Now I am using the long way:
ReplyDelete// allow transitions between ViewControllers
typedef enum {
UIViewControlerAnimationTransitionNone = 0,
UIViewControlerAnimationTransitionFade = 6,
UIViewControlerAnimationTransitionPushFromTop = 7,
UIViewControlerAnimationTransitionPushFromRight = 1,
UIViewControlerAnimationTransitionPushFromBottom = 3,
UIViewControlerAnimationTransitionPushFromLeft = 2,
UIViewControlerAnimationTransitionSlide = 8,
UIViewControlerAnimationTransitionReveal = 9,
UIViewControlerAnimationTransitionFlipFromLeft = 10,
UIViewControlerAnimationTransitionFlipFromRight = 11
} UIViewControllerAnimationTransition;
@interface UIViewController(extended)
- (void)dismissModalViewControllerWithTransition:(UIViewControllerAnimationTransition)transition;
- (void)presentModalViewController:(id)viewController withTransition:(UIViewControllerAnimationTransition)transition;
@end
LLAP, Cy