|
@@ -27,6 +27,17 @@ RCT_ENUM_CONVERTER(UIModalPresentationStyle,
|
27
|
27
|
|
28
|
28
|
@end
|
29
|
29
|
|
|
30
|
+@implementation RCTConvert (UIModalTransitionStyle)
|
|
31
|
+
|
|
32
|
+RCT_ENUM_CONVERTER(UIModalTransitionStyle,
|
|
33
|
+ (@{@"coverVertical": @(UIModalTransitionStyleCoverVertical),
|
|
34
|
+ @"flipHorizontal": @(UIModalTransitionStyleFlipHorizontal),
|
|
35
|
+ @"crossDissolve": @(UIModalTransitionStyleCrossDissolve),
|
|
36
|
+ @"partialCurl": @(UIModalTransitionStylePartialCurl)
|
|
37
|
+ }), UIModalTransitionStyleCoverVertical, integerValue)
|
|
38
|
+
|
|
39
|
+@end
|
|
40
|
+
|
30
|
41
|
@implementation RNNNavigationOptions
|
31
|
42
|
|
32
|
43
|
|
|
@@ -91,10 +102,17 @@ RCT_ENUM_CONVERTER(UIModalPresentationStyle,
|
91
|
102
|
backgroundImageView.image = [self.rootBackgroundImage isKindOfClass:[UIImage class]] ? (UIImage*)self.rootBackgroundImage : [RCTConvert UIImage:self.rootBackgroundImage];
|
92
|
103
|
[backgroundImageView setContentMode:UIViewContentModeScaleAspectFill];
|
93
|
104
|
}
|
94
|
|
-
|
95
|
|
- if (self.modalPresentationStyle) {
|
96
|
|
- viewController.modalPresentationStyle = [RCTConvert UIModalPresentationStyle:self.modalPresentationStyle];
|
97
|
|
- }
|
|
105
|
+
|
|
106
|
+ [self applyModalOptions:viewController];
|
|
107
|
+}
|
|
108
|
+
|
|
109
|
+- (void)applyModalOptions:(UIViewController*)viewController {
|
|
110
|
+ if (self.modalPresentationStyle) {
|
|
111
|
+ viewController.modalPresentationStyle = [RCTConvert UIModalPresentationStyle:self.modalPresentationStyle];
|
|
112
|
+ }
|
|
113
|
+ if (self.modalTransitionStyle) {
|
|
114
|
+ viewController.modalTransitionStyle = [RCTConvert UIModalTransitionStyle:self.modalTransitionStyle];
|
|
115
|
+ }
|
98
|
116
|
}
|
99
|
117
|
|
100
|
118
|
- (UIInterfaceOrientationMask)supportedOrientations {
|