CNLIVEViewController.m
1.58 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// CNLIVEViewController.m
// CNLiveCustomControl
//
// Created by 153993236@qq.com on 12/12/2019.
// Copyright (c) 2019 153993236@qq.com. All rights reserved.
//
#import "CNLIVEViewController.h"
#import "CNLiveNavigationBar.h"
#import "QMUIKit.h"
#import "CNLiveCategory.h"
@interface CNLIVEViewController ()
@property (nonatomic, strong) CNLiveNavigationBar *navigationBar;
@end
@implementation CNLIVEViewController
#pragma mark - 生命周期
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
self.navigationController.navigationBarHidden = YES;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.view.backgroundColor = [UIColor redColor];
[self.view addSubview:self.navigationBar];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (CNLiveNavigationBar *)navigationBar {
if (!_navigationBar) {
_navigationBar = [CNLiveNavigationBar navigationBar];
_navigationBar.title.text = @"首页";
// UIImage *image = [self getImageWithImageName:@"cnlive_back_white_b" bundleName:@"CNLiveCustomControl" targetClass:[CNLiveNavigationBar class]];
// _navigationBar.leftImage = image;
// _navigationBar.rightTitle = @"相册";
_navigationBar.onClickLeftButton = ^{
NSLog(@"左");
};
_navigationBar.onClickRightButton = ^{
NSLog(@"右");
};
// _navigationBar.right = nil;
}
return _navigationBar;
}
@end