diff --git a/ios/Classes/Api/MOP_showBotomSheetModel.m b/ios/Classes/Api/MOP_showBotomSheetModel.m index f86728a..522a23c 100644 --- a/ios/Classes/Api/MOP_showBotomSheetModel.m +++ b/ios/Classes/Api/MOP_showBotomSheetModel.m @@ -79,6 +79,7 @@ returnInsets = inset;\ [self.cancelButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; [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 addTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside]; UIView *line = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.cancelButton.frame.size.width, 0.5)]; line.backgroundColor = [UIColor lightGrayColor]; @@ -106,8 +107,7 @@ returnInsets = inset;\ }]; } -- (void)dismiss -{ +- (void)dismiss { [UIView animateWithDuration:0.25 animations:^{ self.contentView.transform = CGAffineTransformMakeTranslation(0, self.contentView.frame.size.height); self.alpha = 0.5f; diff --git a/ios/Classes/MopPlugin.m b/ios/Classes/MopPlugin.m index 6cef3a3..8d14672 100644 --- a/ios/Classes/MopPlugin.m +++ b/ios/Classes/MopPlugin.m @@ -69,6 +69,12 @@ static MopPlugin *_instance; else if ([@"getAppletInfo" isEqualToString:call.method]) { 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 { MOPApiRequest* request = [[MOPApiRequest alloc] init]; request.command = call.method;