Created
December 12, 2012 17:35
-
-
Save XBeg9/4269854 to your computer and use it in GitHub Desktop.
Replace rootViewController via custom Segue
This file contains 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
#import <UIKit/UIKit.h> | |
@interface FullyReplaceSegue : UIStoryboardSegue | |
@end |
This file contains 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
#import "FullyReplaceSegue.h" | |
@implementation FullyReplaceSegue | |
- (void)perform | |
{ | |
UIViewController *dest = (UIViewController *) self.destinationViewController; | |
UIWindow *window = [UIApplication sharedApplication].keyWindow; | |
window.rootViewController = dest; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment