浏览代码

add scrollbar

Olalekan Oladipupo 7 年之前
父节点
当前提交
e2b5cb85ab
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      ios/Classes/FlutterWebviewPlugin.m

+ 3 - 0
ios/Classes/FlutterWebviewPlugin.m

@@ -59,6 +59,7 @@ static NSString *const CHANNEL_NAME = @"flutter_webview_plugin";
     _enableAppScheme = call.arguments[@"enableAppScheme"];
     NSString *userAgent = call.arguments[@"userAgent"];
     NSNumber *withZoom = call.arguments[@"withZoom"];
+    NSNumber *scrollBar = call.arguments[@"scrollBar"];
     
     if (clearCache != (id)[NSNull null] && [clearCache boolValue]) {
         [[NSURLCache sharedURLCache] removeAllCachedResponses];
@@ -84,6 +85,8 @@ static NSString *const CHANNEL_NAME = @"flutter_webview_plugin";
     self.webview.navigationDelegate = self;
     self.webview.scrollView.delegate = self;
     self.webview.hidden = [hidden boolValue];
+    self.webview.showsHorizontalScrollIndicator = [scrollBar boolValue];
+    self.webView.showsVerticalScrollIndicator = [scrollBar boolValue];
 
     _enableZoom = [withZoom boolValue];