CNLIVETabberViewController.m 1.04 KB
//
//  CNLIVETabberViewController.m
//  CNLiveCommuntyModule_Example
//
//  Created by open on 2022/3/3.
//  Copyright © 2022 woshiliushiyu. All rights reserved.
//

#import "CNLIVETabberViewController.h"
#import "CNLIVEViewController.h"
@interface CNLIVETabberViewController ()

@end

@implementation CNLIVETabberViewController

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self.navigationController.navigationBar setHidden:YES];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self addChildVC:[[CNLIVEViewController alloc] init] withTitle:@"第一个"];
    [self addChildVC:[[CNLIVEViewController alloc] init] withTitle:@"第二个"];
    [self addChildVC:[[CNLIVEViewController alloc] init] withTitle:@"第三个"];
}
-(void)addChildVC:(UIViewController *)VC withTitle:(NSString *)title{

    VC.title = title;
    UINavigationController *mainVC = [[UINavigationController alloc]initWithRootViewController:VC];
    
    [self addChildViewController:mainVC];

}

@end