Created
February 3, 2016 02:58
-
-
Save anknetau/75062374a9bc45f1a2d8 to your computer and use it in GitHub Desktop.
Add a child view controller
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
UIViewController* controller = [self.storyboard instantiateViewControllerWithIdentifier:@"identifier"]; // or whatever | |
[self addChildViewController:controller]; | |
controller.view.frame = CGRectMake(0, 0, 100, 100); // or whatever | |
[self.view addSubview:controller.view]; | |
[controller didMoveToParentViewController:self]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment