timer callback

This commit is contained in:
pengfei.zhou
2019-07-28 01:26:19 +08:00
parent b0370847d9
commit 5642d5ddc0
20 changed files with 486 additions and 561 deletions

View File

@@ -38,14 +38,9 @@ - (void)viewDidLoad {
DoricJSEngine *jsengine = [[DoricJSEngine alloc] init];
[self test:@"method",@"1",@"2",nil];
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setTitle:@"sss" forState:UIControlStateNormal];
btn.tag = 111;
[btn addTarget:self action:@selector(testBtn:) forControlEvents:UIControlEventTouchUpInside];
}
- (void)testBtn:(UIButton *)btn {
btn.tag;
NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"demo" ofType:@"js"];
NSString *jsContent = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
NSLog(@"%@",jsContent);
}
-(void)test:(NSString *)method,... {