Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // add child view
- UIViewController* controller = [self.storyboard instantiateViewControllerWithIdentifier:@"test"];
- [self addChildViewController:controller];
- controller.view.frame = CGRectMake(0, 44, 320, 320);
- [self.view addSubview:controller.view];
- [controller didMoveToParentViewController:self];
- // remove child view
- UIViewController *vc = [self.childViewControllers lastObject];
- [vc.view removeFromSuperview];
- [vc removeFromParentViewController];
Add Comment
Please, Sign In to add comment