-
-
Save luiseduardohdbackup/353d58de575e041baaef to your computer and use it in GitHub Desktop.
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
// | |
// iOS5EmbedSegue.h | |
// Created by Stephanie Sharp on 2/05/13. | |
// | |
#import <UIKit/UIKit.h> | |
@interface iOS5EmbedSegue : UIStoryboardSegue | |
@property (nonatomic, strong) UIView * containerView; | |
@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
// | |
// iOS5EmbedSegue.m | |
// Created by Stephanie Sharp on 2/05/13. | |
// | |
// Helpful links: | |
// http://stackoverflow.com/questions/14432310/embed-segue-ios-5 | |
// http://www.quentamia.com/blog/embed-segue-in-ios-5/ | |
#import "iOS5EmbedSegue.h" | |
@implementation iOS5EmbedSegue | |
@synthesize containerView; | |
- (void)perform | |
{ | |
if (!self.containerView) | |
self.containerView = [self.sourceViewController view]; | |
[self.sourceViewController addChildViewController:self.destinationViewController]; | |
[self.containerView addSubview:[self.destinationViewController view]]; | |
[self.destinationViewController didMoveToParentViewController:self.sourceViewController]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment