Your dropbox link doesn't work, so I couldn't try this out. Try setting the frame of secondVC before you add it as a subview:
secondVC.view.frame = self.view.bounds;
If you want to do it with constraints, I do it this way:
- (IBAction)child:(id)sender {
[self addChildViewController:self.secondVC];
[self.view addSubview:self.secondVC.view];
[self constrainViewEqual:secondVC.view];
[self.secondVC didMoveToParentViewController:self];
}
-(void)constrainViewEqual:(UIView *) view {
[view setTranslatesAutoresizingMaskIntoConstraints:NO];
NSLayoutConstraint *con1 = [NSLayoutConstraint constraintWithItem:self.view attribute:NSLayoutAttributeCenterX relatedBy:0 toItem:view attribute:NSLayoutAttributeCenterX multiplier:1 constant:0];
NSLayoutConstraint *con2 = [NSLayoutConstraint constraintWithItem:self.view attribute:NSLayoutAttributeCenterY relatedBy:0 toItem:view attribute:NSLayoutAttributeCenterY multiplier:1 constant:0];
NSLayoutConstraint *con3 = [NSLayoutConstraint constraintWithItem:self.view attribute:NSLayoutAttributeWidth relatedBy:0 toItem:view attribute:NSLayoutAttributeWidth multiplier:1 constant:0];
NSLayoutConstraint *con4 = [NSLayoutConstraint constraintWithItem:self.view attribute:NSLayoutAttributeHeight relatedBy:0 toItem:view attribute:NSLayoutAttributeHeight multiplier:1 constant:0];
NSArray *constraints = @[con1,con2,con3,con4];
[self.view addConstraints:constraints];
}
Since I use constraints fairly often, I have the above method (and others) in a categorry on UIView to keep my code looking cleaner.