需要同时将视图控制器和对应的view
加载到当前视图控制器上
SecondController *second = [[ SecondController alloc ] init ];
second. view . frame = CGRectMake ( 20 , 20 , self . view . bounds . size . width - 40 , self . view . bounds . size . height - 40 );
[ self addChildViewController :second];
[ self . view addSubview :second. view ];
加载到当前视图控制器上
SecondController *second = [[ SecondController alloc ] init ];
second. view . frame = CGRectMake ( 20 , 20 , self . view . bounds . size . width - 40 , self . view . bounds . size . height - 40 );
[ self addChildViewController :second];
[ self . view addSubview :second. view ];