CNLiveViewController.m
1.08 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
//
// CNLiveViewController.m
// CNLiveSubsList
//
// Created by 殷巧娟 on 02/15/2019.
// Copyright (c) 2019 殷巧娟. All rights reserved.
//
#import "CNLiveViewController.h"
#import "CNLiveSubsListViewController.h"
@interface CNLiveViewController ()
@end
@implementation CNLiveViewController
- (void)viewDidLoad
{
[super viewDidLoad];
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(100, 100, 100, 100);
button.backgroundColor = [UIColor cyanColor];
[button addTarget:self action:@selector(buttonClicked) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:button];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)buttonClicked {
CNLiveSubsListViewController *vc = [[CNLiveSubsListViewController alloc]init];
vc.view.backgroundColor = [UIColor whiteColor];
[self presentViewController:vc animated:YES completion:nil];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end