fix:新增webViewBounces接口,禁用webview弹性解决分页页面问题
parent
e52609ba67
commit
4ba41676a0
|
@ -1 +1 @@
|
|||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-09-10 20:41:42.050199","version":"2.2.2"}
|
||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-11-15 23:44:20.482386","version":"2.2.2"}
|
|
@ -87,7 +87,7 @@ packages:
|
|||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "2.33.15"
|
||||
version: "2.34.5"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// MOP_webViewBounces.h
|
||||
// mop
|
||||
//
|
||||
// Created by beetle_92 on 2021/11/16.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MOPBaseApi.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MOP_webViewBounces : MOPBaseApi
|
||||
|
||||
@property (nonatomic, assign) BOOL bounces;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,32 @@
|
|||
//
|
||||
// MOP_webViewBounces.m
|
||||
// mop
|
||||
//
|
||||
// Created by beetle_92 on 2021/11/16.
|
||||
//
|
||||
|
||||
#import "MOP_webViewBounces.h"
|
||||
#import "MOPTools.h"
|
||||
|
||||
@implementation MOP_webViewBounces
|
||||
|
||||
- (void)setupApiWithSuccess:(void (^)(NSDictionary<NSString *,id> * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel {
|
||||
UIViewController *currentVC = [MOPTools topViewController];
|
||||
WKWebView *webView = [self searchWKWebView:currentVC.view];
|
||||
webView.scrollView.bounces = self.bounces;
|
||||
}
|
||||
|
||||
- (WKWebView *)searchWKWebView:(UIView *)view {
|
||||
for (UIView *subview in view.subviews) {
|
||||
if ([subview isKindOfClass:[WKWebView class]]) {
|
||||
return (WKWebView *)subview;
|
||||
}
|
||||
WKWebView *webView = [self searchWKWebView:subview];
|
||||
if (webView) {
|
||||
return webView;
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
|
@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk.
|
|||
s.dependency 'Flutter'
|
||||
s.ios.deployment_target = '9.0'
|
||||
|
||||
s.dependency 'FinApplet' , '2.34.5'
|
||||
s.dependency 'FinAppletExt' , '2.34.5'
|
||||
s.dependency 'FinApplet' , '2.35.0-alpha20211116v012'
|
||||
s.dependency 'FinAppletExt' , '2.35.0-alpha20211116v12'
|
||||
end
|
||||
|
||||
|
|
10
lib/mop.dart
10
lib/mop.dart
|
@ -54,9 +54,7 @@ class Mop {
|
|||
if (handler != null) {
|
||||
return await handler(call.arguments);
|
||||
}
|
||||
} else if (call.method.startsWith("extensionApi:")) {
|
||||
|
||||
}
|
||||
} else if (call.method.startsWith("extensionApi:")) {}
|
||||
}
|
||||
|
||||
///
|
||||
|
@ -242,4 +240,10 @@ class Mop {
|
|||
print(data);
|
||||
return data;
|
||||
}
|
||||
|
||||
/// WKWebView的弹性设置
|
||||
void webViewBounces(bool bounces) async {
|
||||
await _channel.invokeMapMethod("webViewBounces", {'bounces': bounces});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue