|
@@ -67,6 +67,9 @@ static NSDictionary* customCertificatesForHost;
|
67
|
67
|
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 /* __IPHONE_11_0 */
|
68
|
68
|
UIScrollViewContentInsetAdjustmentBehavior _savedContentInsetAdjustmentBehavior;
|
69
|
69
|
#endif
|
|
70
|
+#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 /* __IPHONE_13_0 */
|
|
71
|
+ BOOL _savedAutomaticallyAdjustsScrollIndicatorInsets;
|
|
72
|
+#endif
|
70
|
73
|
}
|
71
|
74
|
|
72
|
75
|
- (instancetype)initWithFrame:(CGRect)frame
|
|
@@ -87,6 +90,10 @@ static NSDictionary* customCertificatesForHost;
|
87
|
90
|
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 /* __IPHONE_11_0 */
|
88
|
91
|
_savedContentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
89
|
92
|
#endif
|
|
93
|
+#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 /* __IPHONE_13_0 */
|
|
94
|
+ _savedAutomaticallyAdjustsScrollIndicatorInsets = NO;
|
|
95
|
+#endif
|
|
96
|
+
|
90
|
97
|
}
|
91
|
98
|
|
92
|
99
|
if (@available(iOS 12.0, *)) {
|
|
@@ -280,6 +287,9 @@ static NSDictionary* customCertificatesForHost;
|
280
|
287
|
_webView.scrollView.contentInsetAdjustmentBehavior = _savedContentInsetAdjustmentBehavior;
|
281
|
288
|
}
|
282
|
289
|
#endif
|
|
290
|
+#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 /* __IPHONE_13_0 */
|
|
291
|
+ _webView.scrollView.automaticallyAdjustsScrollIndicatorInsets = _savedAutomaticallyAdjustsScrollIndicatorInsets;
|
|
292
|
+#endif
|
283
|
293
|
|
284
|
294
|
[self addSubview:_webView];
|
285
|
295
|
[self setHideKeyboardAccessoryView: _savedHideKeyboardAccessoryView];
|
|
@@ -396,7 +406,17 @@ static NSDictionary* customCertificatesForHost;
|
396
|
406
|
}
|
397
|
407
|
}
|
398
|
408
|
#endif
|
399
|
|
-
|
|
409
|
+#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 /* __IPHONE_13_0 */
|
|
410
|
+- (void)setAutomaticallyAdjustsScrollIndicatorInsets:(BOOL)automaticallyAdjustsScrollIndicatorInsets{
|
|
411
|
+ _savedAutomaticallyAdjustsScrollIndicatorInsets = automaticallyAdjustsScrollIndicatorInsets;
|
|
412
|
+ if (_webView == nil) {
|
|
413
|
+ return;
|
|
414
|
+ }
|
|
415
|
+ if ([_webView.scrollView respondsToSelector:@selector(setAutomaticallyAdjustsScrollIndicatorInsets:)]) {
|
|
416
|
+ _webView.scrollView.automaticallyAdjustsScrollIndicatorInsets = automaticallyAdjustsScrollIndicatorInsets;
|
|
417
|
+ }
|
|
418
|
+}
|
|
419
|
+#endif
|
400
|
420
|
/**
|
401
|
421
|
* This method is called whenever JavaScript running within the web view calls:
|
402
|
422
|
* - window.webkit.messageHandlers[MessageHandlerName].postMessage
|