react-native-navigation的迁移库

RNNConvert.m 1.5KB

12345678910111213141516171819202122232425262728293031323334
  1. #import "RNNConvert.h"
  2. @implementation RNNConvert
  3. + (UIModalPresentationStyle)defaultModalPresentationStyle {
  4. if (@available(iOS 13.0, *)) {
  5. return UIModalPresentationAutomatic;
  6. } else {
  7. return UIModalPresentationOverFullScreen;
  8. }
  9. }
  10. RCT_ENUM_CONVERTER(UIModalTransitionStyle,
  11. (@{@"coverVertical": @(UIModalTransitionStyleCoverVertical),
  12. @"flipHorizontal": @(UIModalTransitionStyleFlipHorizontal),
  13. @"crossDissolve": @(UIModalTransitionStyleCrossDissolve),
  14. @"partialCurl": @(UIModalTransitionStylePartialCurl)
  15. }), UIModalTransitionStyleCoverVertical, integerValue)
  16. RCT_ENUM_CONVERTER(UIModalPresentationStyle,
  17. (@{@"fullScreen": @(UIModalPresentationFullScreen),
  18. @"pageSheet": @(UIModalPresentationPageSheet),
  19. @"formSheet": @(UIModalPresentationFormSheet),
  20. @"currentContext": @(UIModalPresentationCurrentContext),
  21. @"custom": @(UIModalPresentationCustom),
  22. @"overFullScreen": @(UIModalPresentationOverFullScreen),
  23. @"overCurrentContext": @(UIModalPresentationOverCurrentContext),
  24. @"popover": @(UIModalPresentationPopover),
  25. @"none": @(UIModalPresentationNone),
  26. @"default": @([RNNConvert defaultModalPresentationStyle])
  27. }), UIModalPresentationFullScreen, integerValue)
  28. @end