ad 绘图小程序

master
wanghualei 2020-11-12 12:18:30 +08:00
parent 1d5cbb8bcb
commit fb58c0118a
1 changed files with 16 additions and 0 deletions

View File

@ -19,6 +19,12 @@
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
UIButton *btn1 = [[UIButton alloc] initWithFrame:CGRectMake(100, 100, 200, 40)];
[btn1 setTitle:@"打开绘图小程序" forState:UIControlStateNormal];
[btn1 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[btn1 setBackgroundColor:[UIColor grayColor]];
[btn1 addTarget:self action:@selector(onCanvasClick:) forControlEvents:UIControlEventTouchUpInside];
UIButton *btn2 = [[UIButton alloc] initWithFrame:CGRectMake(100, 150, 200, 40)]; UIButton *btn2 = [[UIButton alloc] initWithFrame:CGRectMake(100, 150, 200, 40)];
[btn2 setTitle:@"打开官方小程序" forState:UIControlStateNormal]; [btn2 setTitle:@"打开官方小程序" forState:UIControlStateNormal];
[btn2 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [btn2 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
@ -31,10 +37,20 @@
[btn3 setBackgroundColor:[UIColor grayColor]]; [btn3 setBackgroundColor:[UIColor grayColor]];
[btn3 addTarget:self action:@selector(onProfileClick:) forControlEvents:UIControlEventTouchUpInside]; [btn3 addTarget:self action:@selector(onProfileClick:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:btn1];
[self.view addSubview:btn2]; [self.view addSubview:btn2];
[self.view addSubview:btn3]; [self.view addSubview:btn3];
} }
- (void)onCanvasClick:(id)sender
{
NSString *appId = @"5facb3a52dcbff00017469bd";
//
[[FATClient sharedClient] startRemoteApplet:appId startParams:nil InParentViewController:self completion:^(BOOL result, NSError *error) {
NSLog(@"result:%d---error:%@", result, error);
}];
}
- (void)onDemoClick:(id)sender { - (void)onDemoClick:(id)sender {
NSString *appId = @"5fa214a29a6a7900019b5cc1"; NSString *appId = @"5fa214a29a6a7900019b5cc1";