|
@@ -109,6 +109,9 @@ static NSDictionary* customCertificatesForHost;
|
109
|
109
|
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 /* __IPHONE_11_0 */
|
110
|
110
|
UIScrollViewContentInsetAdjustmentBehavior _savedContentInsetAdjustmentBehavior;
|
111
|
111
|
#endif
|
|
112
|
+#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 /* __IPHONE_13_0 */
|
|
113
|
+ BOOL _savedAutomaticallyAdjustsScrollIndicatorInsets;
|
|
114
|
+#endif
|
112
|
115
|
}
|
113
|
116
|
|
114
|
117
|
- (instancetype)initWithFrame:(CGRect)frame
|
|
@@ -140,6 +143,10 @@ static NSDictionary* customCertificatesForHost;
|
140
|
143
|
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 /* __IPHONE_11_0 */
|
141
|
144
|
_savedContentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
142
|
145
|
#endif
|
|
146
|
+#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 /* __IPHONE_13_0 */
|
|
147
|
+ _savedAutomaticallyAdjustsScrollIndicatorInsets = NO;
|
|
148
|
+#endif
|
|
149
|
+
|
143
|
150
|
}
|
144
|
151
|
|
145
|
152
|
#if !TARGET_OS_OSX
|
|
@@ -299,6 +306,9 @@ static NSDictionary* customCertificatesForHost;
|
299
|
306
|
_webView.scrollView.contentInsetAdjustmentBehavior = _savedContentInsetAdjustmentBehavior;
|
300
|
307
|
}
|
301
|
308
|
#endif
|
|
309
|
+#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 /* __IPHONE_13_0 */
|
|
310
|
+ _webView.scrollView.automaticallyAdjustsScrollIndicatorInsets = _savedAutomaticallyAdjustsScrollIndicatorInsets;
|
|
311
|
+#endif
|
302
|
312
|
|
303
|
313
|
[self addSubview:_webView];
|
304
|
314
|
[self setHideKeyboardAccessoryView: _savedHideKeyboardAccessoryView];
|
|
@@ -445,7 +455,17 @@ static NSDictionary* customCertificatesForHost;
|
445
|
455
|
}
|
446
|
456
|
}
|
447
|
457
|
#endif
|
448
|
|
-
|
|
458
|
+#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 /* __IPHONE_13_0 */
|
|
459
|
+- (void)setAutomaticallyAdjustsScrollIndicatorInsets:(BOOL)automaticallyAdjustsScrollIndicatorInsets{
|
|
460
|
+ _savedAutomaticallyAdjustsScrollIndicatorInsets = automaticallyAdjustsScrollIndicatorInsets;
|
|
461
|
+ if (_webView == nil) {
|
|
462
|
+ return;
|
|
463
|
+ }
|
|
464
|
+ if ([_webView.scrollView respondsToSelector:@selector(setAutomaticallyAdjustsScrollIndicatorInsets:)]) {
|
|
465
|
+ _webView.scrollView.automaticallyAdjustsScrollIndicatorInsets = automaticallyAdjustsScrollIndicatorInsets;
|
|
466
|
+ }
|
|
467
|
+}
|
|
468
|
+#endif
|
449
|
469
|
/**
|
450
|
470
|
* This method is called whenever JavaScript running within the web view calls:
|
451
|
471
|
* - window.webkit.messageHandlers[MessageHandlerName].postMessage
|