From eb736496c4e4155bb43a9ad172d5272d949d4d81 Mon Sep 17 00:00:00 2001 From: Masayuki Iwai Date: Fri, 29 May 2020 16:38:14 +0900 Subject: [PATCH 1/2] Support iOS 13 style modal. --- SafariViewManager.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SafariViewManager.m b/SafariViewManager.m index b606e2d..a669302 100644 --- a/SafariViewManager.m +++ b/SafariViewManager.m @@ -70,7 +70,11 @@ - (void)stopObserving // Set modal transition style if (fromBottom) { +#ifdef __IPHONE_13_0 + _safariView.modalPresentationStyle = UIModalPresentationAutomatic; +#else _safariView.modalPresentationStyle = UIModalPresentationOverFullScreen; +#endif } // get the view controller closest to the foreground From 6589ce8641e105d5dc9a28d87c5dc64797d6d539 Mon Sep 17 00:00:00 2001 From: Masayuki Iwai Date: Mon, 1 Jun 2020 12:47:34 +0900 Subject: [PATCH 2/2] Support iOS 13 style modal. --- SafariViewManager.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SafariViewManager.m b/SafariViewManager.m index a669302..577af99 100644 --- a/SafariViewManager.m +++ b/SafariViewManager.m @@ -71,7 +71,11 @@ - (void)stopObserving // Set modal transition style if (fromBottom) { #ifdef __IPHONE_13_0 - _safariView.modalPresentationStyle = UIModalPresentationAutomatic; + if (@available(iOS 13.0, *)) { + _safariView.modalPresentationStyle = UIModalPresentationAutomatic; + } else { + _safariView.modalPresentationStyle = UIModalPresentationOverFullScreen; + } #else _safariView.modalPresentationStyle = UIModalPresentationOverFullScreen; #endif