Skip to content

FMountain/FSControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

一个父控制器下有几个子控制器.

一个父控制器下有几个子控制器. (下拉刷新02-动画图片) ###主要代码 viewDidLoad //添加子控制器 [self addChildViewController:[[A3OneViewController alloc] init]]; [self addChildViewController:[[A3TwoViewController alloc] init]]; [self addChildViewController:[[A3ThreeViewController alloc] init]];

- (void)switchToVcAtIndex:(int)index
{
    //添加
    UIViewController *willShowVc = self.childViewControllers[index];
    willShowVc.view.frame = A3ViewFrame;
    [self.view addSubview:willShowVc.view];
    
    //移除
    [self.showingVc.view removeFromSuperview];
    
    self.showingVc = willShowVc;
}

####进阶版 github跳转:父子控制器2-进阶版

Releases

No releases published

Packages

No packages published