forked from shaojiankui/JavaScriptCore-Demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRootViewController.m
More file actions
43 lines (35 loc) · 1.25 KB
/
RootViewController.m
File metadata and controls
43 lines (35 loc) · 1.25 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
//
// RootViewController.m
// SocketIO-Demo
//
// Created by Jakey on 14/12/25.
// Copyright (c) 2014年 www.skyfox.org. All rights reserved.
//
#import "RootViewController.h"
#import <JavaScriptCore/JavaScriptCore.h>
@interface RootViewController ()
@end
@implementation RootViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
}
- (NSString *)loadJsFile:(NSString*)fileName
{
NSString *path = [[NSBundle mainBundle] pathForResource:fileName ofType:@"js"];
NSString *jsScript = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
return jsScript;
}
- (IBAction)JSCallOC:(id)sender {
JSCallOCViewController *jsCallOC = [[JSCallOCViewController alloc]init];
[self.navigationController pushViewController:jsCallOC animated:YES];
}
- (IBAction)OCCallJS:(id)sender {
OCCallJSViewController *ocCallJS = [[OCCallJSViewController alloc]init];
[self.navigationController pushViewController:ocCallJS animated:YES];
}
- (IBAction)HighchartsWeb:(id)sender {
HighchartsWebViewController *highchartsWeb =[[HighchartsWebViewController alloc]init];
[self.navigationController pushViewController:highchartsWeb animated:YES];
}
@end