CNLIVETabberViewController.m
1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// 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