#import @interface RCTConvert (Modal) + (UIModalPresentationStyle)defaultModalPresentationStyle; @end @implementation RCTConvert (Modal) + (UIModalPresentationStyle)defaultModalPresentationStyle { if (@available(iOS 13.0, *)) { return UIModalPresentationAutomatic; } else { return UIModalPresentationOverFullScreen; } } RCT_ENUM_CONVERTER(UIModalTransitionStyle, (@{@"coverVertical": @(UIModalTransitionStyleCoverVertical), @"flipHorizontal": @(UIModalTransitionStyleFlipHorizontal), @"crossDissolve": @(UIModalTransitionStyleCrossDissolve), @"partialCurl": @(UIModalTransitionStylePartialCurl) }), UIModalTransitionStyleCoverVertical, integerValue) RCT_ENUM_CONVERTER(UIModalPresentationStyle, (@{@"fullScreen": @(UIModalPresentationFullScreen), @"pageSheet": @(UIModalPresentationPageSheet), @"formSheet": @(UIModalPresentationFormSheet), @"currentContext": @(UIModalPresentationCurrentContext), @"custom": @(UIModalPresentationCustom), @"overFullScreen": @(UIModalPresentationOverFullScreen), @"overCurrentContext": @(UIModalPresentationOverCurrentContext), @"popover": @(UIModalPresentationPopover), @"none": @(UIModalPresentationNone), @"default": @([RCTConvert defaultModalPresentationStyle]) }), UIModalPresentationFullScreen, integerValue) @end