首页 > 其他 > 详细

childViewController 小计

时间:2016-03-11 10:14:28      阅读:136      评论:0      收藏:0      [点我收藏+]

设置childViewcontroller 

self.ganZhi_vc = [board instantiateViewControllerWithIdentifier:@"HDGanZhiViewController"];
    [self addChildViewController:self.ganZhi_vc];
    
    self.data_vc = [board instantiateViewControllerWithIdentifier:@"HDDataViewController"];
    [self addChildViewController:self.data_vc];
    
    self.map_vc = [board instantiateViewControllerWithIdentifier:@"HDMapViewController"];
    [self addChildViewController:self.map_vc];
    
    self.code_vc = [board instantiateViewControllerWithIdentifier:@"HDCodeViewController"];
    [self addChildViewController:self.code_vc];
    
    [self.view addSubview:self.root_vc.view];
    [self.root_vc didMoveToParentViewController:self];
    _currentViewController = self.root_vc;

界面跳转

-(void)changeViewControllerWith:(UIViewController *)temp
{
    if (_currentViewController != temp) {
        __weak ViewController *weaSelf = self;
        [self transitionFromViewController:_currentViewController toViewController:temp duration:1.0 options:UIViewAnimationOptionLayoutSubviews animations:nil completion:^(BOOL finished) {
        }];
        _currentViewController = temp;
    }
    
}

 

childViewController 小计

原文:http://www.cnblogs.com/ceasar/p/5264292.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!