Skip to content
Permalink
Browse files
Prevent modal dismissal with swipe gestures
Summary:
(Fixing the problems in this diff https://our.intern.facebook.com/intern/diff/D19836548/)

iOS 13 introduced interactive dismissal for modals https://medium.com/hacknicity/view-controller-presentation-changes-in-ios-13-ac8c901ebc4e.
This breaks react modals. We're disabling this feature for react modals
Changelog: [iOS][Fixed]  Prevent interactive dismissal for non-fullscreen modals

Reviewed By: shergin

Differential Revision: D19880343

fbshipit-source-id: e2ad82db3dd827812824862f432d549c865216b9
  • Loading branch information
saumyamukul authored and facebook-github-bot committed Feb 21, 2020
1 parent 8ce27df commit 1e7ed81d16dda4188352e0ccdc0f0bd3ad4741f3
Showing 1 changed file with 7 additions and 0 deletions.
@@ -25,6 +25,13 @@ - (instancetype)init
return nil;
}

#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \
__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0
if (@available(iOS 13.0, *)) {
self.modalInPresentation = YES;
}
#endif

#if !TARGET_OS_TV
_preferredStatusBarStyle = [RCTSharedApplication() statusBarStyle];
_preferredStatusBarHidden = [RCTSharedApplication() isStatusBarHidden];

0 comments on commit 1e7ed81

Please sign in to comment.