Hi, I had the same problem as you. I fixed this by pointing this code to the controller:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]]; AboutTheAppViewController *loginVC = [storyboard instantiateViewControllerWithIdentifier:@"aboutMenuSegueID"]; [self addChildViewController:loginVC]; [loginVC didMoveToParentViewController:self]; [self.view addSubview:loginVC.view];
Then I add this to AboutTheAppViewController (my controller to be shown):
-(void)willMoveToParentViewController:(UIViewController *)parent { NSLog(@"FirstViewController moving to or from parent view controller"); // self.view.backgroundColor=[UIColor blueColor]; } -(void)didMoveToParentViewController:(UIViewController *)parent { NSLog(@"FirstViewController did move to parent view controller"); // self.view.frame = CGRectMake(20, 20, 280, 528); }
I hope this will be helpful.
source share