-
-
Save ltomaszewski/ad0b911f8a0f64a68def to your computer and use it in GitHub Desktop.
Revisions
-
tomohisa created this gist
Jun 8, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ // 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];