-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathViewController.m
40 lines (32 loc) · 1.06 KB
/
ViewController.m
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
//
// ViewController.m
// runTime_btnDelay
//
// Created by 赵飞跃 on 16/9/3.
// Copyright © 2016年 赵飞跃. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame = CGRectMake(49, 59, 69, 78);
btn.backgroundColor = [UIColor redColor];
[btn addTarget:self action:@selector(hahaa) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:btn];
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(10, 150, 400, 200)];
label.numberOfLines = 0 ;
label.text = @"利用运行时,解决多次点击相同按钮,导致重复跳转的问题";
[self.view addSubview:label];
// Do any additional setup after loading the view, typically from a nib.
}
-(void)hahaa {
NSLog(@"查看打印间隔");
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end