jizelin 2022-03-03 16:59:22 +08:00
commit 8160c80b25
2 changed files with 8 additions and 2 deletions

View File

@ -79,6 +79,7 @@ returnInsets = inset;\
[self.cancelButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; [self.cancelButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[self.contentView addSubview:self.cancelButton]; [self.contentView addSubview:self.cancelButton];
self.cancelButton.frame = CGRectMake(0, self.contentView.frame.size.height - kFinoSafeAreaBottom - 50, self.contentView.frame.size.width, 50); self.cancelButton.frame = CGRectMake(0, self.contentView.frame.size.height - kFinoSafeAreaBottom - 50, self.contentView.frame.size.width, 50);
[self.cancelButton addTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside];
UIView *line = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.cancelButton.frame.size.width, 0.5)]; UIView *line = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.cancelButton.frame.size.width, 0.5)];
line.backgroundColor = [UIColor lightGrayColor]; line.backgroundColor = [UIColor lightGrayColor];
@ -106,8 +107,7 @@ returnInsets = inset;\
}]; }];
} }
- (void)dismiss - (void)dismiss {
{
[UIView animateWithDuration:0.25 animations:^{ [UIView animateWithDuration:0.25 animations:^{
self.contentView.transform = CGAffineTransformMakeTranslation(0, self.contentView.frame.size.height); self.contentView.transform = CGAffineTransformMakeTranslation(0, self.contentView.frame.size.height);
self.alpha = 0.5f; self.alpha = 0.5f;

View File

@ -69,6 +69,12 @@ static MopPlugin *_instance;
else if ([@"getAppletInfo" isEqualToString:call.method]) { else if ([@"getAppletInfo" isEqualToString:call.method]) {
result([self appInfoDictWithAppId:call.arguments[@"appId"]]); result([self appInfoDictWithAppId:call.arguments[@"appId"]]);
} }
else if ([@"getAbsolutePath" isEqualToString:call.method]) {
NSString *path = call.arguments[@"path"];
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
dict[@"path"] = [[FATClient sharedClient] fat_absolutePathWithPath:path];
result(dict);
}
else { else {
MOPApiRequest* request = [[MOPApiRequest alloc] init]; MOPApiRequest* request = [[MOPApiRequest alloc] init];
request.command = call.method; request.command = call.method;