forked from pro648/BasicDemos-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSecViewController.m
More file actions
48 lines (33 loc) · 900 Bytes
/
SecViewController.m
File metadata and controls
48 lines (33 loc) · 900 Bytes
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
//
// SecViewController.m
// RunLoop
//
// Created by pro648 on 2020/1/11.
// Copyright © 2020 pro648. All rights reserved.
//
#import "SecViewController.h"
#import "PermanentThread.h"
@interface SecViewController ()
@property (nonatomic, strong) PermanentThread *thread;
@end
@implementation SecViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.view.backgroundColor = [UIColor orangeColor];
self.thread = [[PermanentThread alloc] init];
// [self.thread start];
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
[self.thread executeTask:^{
NSLog(@"touches %s", __func__);
}];
}
- (IBAction)stopButtonTapped:(id)sender {
[self.thread stop];
}
- (void)dealloc {
NSLog(@"控制器 %s", __func__);
// [self.thread stop];
}
@end