Reputation: 71
This is not work on my ios cordova app, I have tried many ways, but the scrollbar still appear.
::-webkit-scrollbar { display: none }
This article tell me to add 2 lines to CDVUIWebViewEngine.m file but I dont know where to paste these lines.
self.webView.scrollView.showsVerticalScrollIndicator = NO;
self.webView.scrollView.showsHorizontalScrollIndicator = NO;
I need a solution to hide scollbar entire my Cordova Ios App, please help me, thanks.
Upvotes: 3
Views: 944
Reputation: 111
If you are using plugin cordova-plugin-ionic-webview
, which is transfer your APP from using UIWebView
to WKWebView
. After build your APP.
find file platforms/ios/your_APP_name/Plugins/cordova-plugin-ionic-webview/CDVWKWebViewEngine.m
;
find lines
wkWebView.configuration.preferences.minimumFontSize = [settings cordovaFloatSettingForKey:@"MinimumFontSize" defaultValue:0.0];
wkWebView.allowsLinkPreview = [settings cordovaBoolSettingForKey:@"AllowLinkPreview" defaultValue:NO];
wkWebView.scrollView.scrollEnabled = [settings cordovaBoolSettingForKey:@"ScrollEnabled" defaultValue:NO];
wkWebView.allowsBackForwardNavigationGestures = [settings cordovaBoolSettingForKey:@"AllowBackForwardNavigationGestures" defaultValue:NO];
wkWebView.scrollView.showsVerticalScrollIndicator = NO;
wkWebView.scrollView.showsHorizontalScrollIndicator = NO;
It works on iOS 13.
Upvotes: 1