Created
June 24, 2012 20:01
-
-
Save sapzildj/2984690 to your computer and use it in GitHub Desktop.
prevent ios5 crash becuase of multiful presentInModalViewController call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BOOL gIsTransitionAvailable = YES; | |
| + (void)presentInModalViewController:(UIViewController *)aViewController animated:(BOOL)aAnimated | |
| { | |
| if (bIOS5) // iOS5인 경우 | |
| { | |
| if (gIsTransitionAvailable) | |
| { | |
| gIsTransitionAvailable = NO; | |
| [[[selfclass] currentViewController] presentViewController:aViewController animated:aAnimated completion:^{ | |
| gIsTransitionAvailable = YES; | |
| }]; | |
| } | |
| } | |
| else | |
| { | |
| [[[selfclass] currentViewController] presentModalViewController:aViewController animated:aAnimated]; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment