CNLiveViewController.m
1.26 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
//
// CNLiveViewController.m
// CNLiveDemo_LXG
//
// Created by jyyjkt on 12/03/2018.
// Copyright (c) 2018 jyyjkt. All rights reserved.
//
#import "CNLiveViewController.h"
#import "CNLiveTestController.h"
@interface CNLiveViewController ()
@end
@implementation CNLiveViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
[self.view setBackgroundColor:[UIColor yellowColor]];
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(100, 100, 100, 100);
[button setTitle:@"进入" forState:UIControlStateNormal];
[button setBackgroundColor:[UIColor blueColor]];
[button addTarget: self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
[button setBackgroundColor:[UIColor greenColor]];
[self.view addSubview:button];
}
- (void)buttonAction:(UIButton *)sender {
CNLiveTestController *testVC = [[CNLiveTestController alloc]init];
[testVC testLog];
[self presentViewController:testVC animated:YES completion:^{
}];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end