From 283fe124b3f64c2bd2f51ab05faf757bd5420584 Mon Sep 17 00:00:00 2001 From: Bill Xie Date: Mon, 25 Jan 2021 20:54:42 +0800 Subject: [PATCH] fix(ios): error on iOS < 13(#1843) * fix:iOS13 scrollView.automaticallyAdjustsScrollIndicatorInsets default value YES which make the webview vertical indicator position in wrong offset * added types and doc * fix: breaking bug for props not include under iOS13 Co-authored-by: BillHsieh Co-authored-by: xietian Co-authored-by: Thibault Malbranche Co-authored-by: Thibault Malbranche --- apple/RNCWebView.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apple/RNCWebView.m b/apple/RNCWebView.m index 712a0e3..91a96e6 100644 --- a/apple/RNCWebView.m +++ b/apple/RNCWebView.m @@ -310,7 +310,9 @@ static NSDictionary* customCertificatesForHost; } #endif #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 /* __IPHONE_13_0 */ - _webView.scrollView.automaticallyAdjustsScrollIndicatorInsets = _savedAutomaticallyAdjustsScrollIndicatorInsets; + if (@available(iOS 13.0, *)) { + _webView.scrollView.automaticallyAdjustsScrollIndicatorInsets = _savedAutomaticallyAdjustsScrollIndicatorInsets; + } #endif [self addSubview:_webView];