Procházet zdrojové kódy

Removes unable to find UIManager module warning (#6043)

Yogev Ben David před 4 roky
rodič
revize
ba1260402c
No account linked to committer's email address

+ 1
- 1
lib/ios/ModalTransitionDelegate.h Zobrazit soubor

@@ -4,7 +4,7 @@
4 4
 
5 5
 @interface ModalTransitionDelegate : TransitionDelegate
6 6
 
7
-- (instancetype)initWithContentTransition:(TransitionOptions *)contentTransition uiManager:(RCTUIManager *)uiManager;
7
+- (instancetype)initWithContentTransition:(TransitionOptions *)contentTransition bridge:(RCTBridge *)bridge;
8 8
 
9 9
 @property (nonatomic, strong) TransitionOptions* contentTransitionOptions;
10 10
 

+ 2
- 2
lib/ios/ModalTransitionDelegate.m Zobrazit soubor

@@ -2,8 +2,8 @@
2 2
 
3 3
 @implementation ModalTransitionDelegate
4 4
 
5
-- (instancetype)initWithContentTransition:(TransitionOptions *)contentTransitionOptions uiManager:(RCTUIManager *)uiManager {
6
-    self = [super initWithUIManager:uiManager];
5
+- (instancetype)initWithContentTransition:(TransitionOptions *)contentTransitionOptions bridge:(RCTBridge *)bridge {
6
+    self = [super initWithBridge:bridge];
7 7
     _contentTransitionOptions = contentTransitionOptions;
8 8
     return self;
9 9
 }

+ 1
- 1
lib/ios/RNNBridgeManager.m Zobrazit soubor

@@ -88,7 +88,7 @@
88 88
 
89 89
 - (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge {
90 90
 	RNNEventEmitter *eventEmitter = [[RNNEventEmitter alloc] init];
91
-    _modalManager = [[RNNModalManager alloc] initWithUIManager:_bridge.uiManager];
91
+    _modalManager = [[RNNModalManager alloc] initWithBridge:bridge];
92 92
     
93 93
 	id<RNNComponentViewCreator> rootViewCreator = [[RNNReactRootViewCreator alloc] initWithBridge:bridge eventEmitter:eventEmitter];
94 94
 	_componentRegistry = [[RNNReactComponentRegistry alloc] initWithCreator:rootViewCreator];

+ 2
- 2
lib/ios/RNNModalManager.h Zobrazit soubor

@@ -1,6 +1,6 @@
1 1
 #import <Foundation/Foundation.h>
2 2
 #import <UIKit/UIKit.h>
3
-#import <React/RCTUIManager.h>
3
+#import <React/RCTBridge.h>
4 4
 
5 5
 typedef void (^RNNTransitionCompletionBlock)(void);
6 6
 typedef void (^RNNTransitionWithComponentIdCompletionBlock)(NSString *componentId);
@@ -16,7 +16,7 @@ typedef void (^RNNTransitionRejectionBlock)(NSString *code, NSString *message, N
16 16
 
17 17
 @interface RNNModalManager : NSObject <UIAdaptivePresentationControllerDelegate>
18 18
 
19
-- (instancetype)initWithUIManager:(RCTUIManager *)uiManager;
19
+- (instancetype)initWithBridge:(RCTBridge *)bridge;
20 20
 
21 21
 @property (nonatomic, weak) id<RNNModalManagerDelegate> delegate;
22 22
 

+ 5
- 6
lib/ios/RNNModalManager.m Zobrazit soubor

@@ -12,7 +12,7 @@
12 12
 @implementation RNNModalManager {
13 13
 	NSMutableArray* _pendingModalIdsToDismiss;
14 14
 	NSMutableArray* _presentedModals;
15
-    RCTUIManager* _uiManager;
15
+    RCTBridge* _bridge;
16 16
 }
17 17
 
18 18
 
@@ -20,13 +20,12 @@
20 20
 	self = [super init];
21 21
 	_pendingModalIdsToDismiss = [[NSMutableArray alloc] init];
22 22
 	_presentedModals = [[NSMutableArray alloc] init];
23
-
24 23
 	return self;
25 24
 }
26 25
 
27
-- (instancetype)initWithUIManager:(RCTUIManager *)uiManager {
26
+- (instancetype)initWithBridge:(RCTBridge *)bridge {
28 27
     self = [self init];
29
-    _uiManager = uiManager;
28
+    _bridge = bridge;
30 29
     return self;
31 30
 }
32 31
 
@@ -45,7 +44,7 @@
45 44
 	}
46 45
 	    
47 46
 	if (viewController.resolveOptionsWithDefault.animations.showModal.hasAnimation) {
48
-        _modalTransitionDelegate = [[ModalTransitionDelegate alloc] initWithContentTransition:viewController.resolveOptionsWithDefault.animations.showModal uiManager:_uiManager];
47
+        _modalTransitionDelegate = [[ModalTransitionDelegate alloc] initWithContentTransition:viewController.resolveOptionsWithDefault.animations.showModal bridge:_bridge];
49 48
         viewController.transitioningDelegate = _modalTransitionDelegate;
50 49
         viewController.modalPresentationStyle = UIModalPresentationCustom;
51 50
 	}
@@ -101,7 +100,7 @@
101 100
 	UIViewController* topPresentedVC = [self topPresentedVC];
102 101
 	
103 102
 	if (optionsWithDefault.animations.dismissModal.hasAnimation) {
104
-        _modalTransitionDelegate = [[ModalDismissTransitionDelegate alloc] initWithContentTransition:modalToDismiss.resolveOptionsWithDefault.animations.dismissModal uiManager:_uiManager];
103
+        _modalTransitionDelegate = [[ModalDismissTransitionDelegate alloc] initWithContentTransition:modalToDismiss.resolveOptionsWithDefault.animations.dismissModal bridge:_bridge];
105 104
 		[self topViewControllerParent:modalToDismiss].transitioningDelegate = _modalTransitionDelegate;
106 105
 	}
107 106
 

+ 2
- 2
lib/ios/StackControllerDelegate.m Zobrazit soubor

@@ -30,9 +30,9 @@
30 30
 											   fromViewController:(UIViewController*)fromVC
31 31
 												 toViewController:(UIViewController*)toVC {
32 32
 	if (operation == UINavigationControllerOperationPush && toVC.resolveOptions.animations.push.hasCustomAnimation) {
33
-		return [[StackTransitionDelegate alloc] initWithScreenTransition:toVC.resolveOptions.animations.push uiManager:_eventEmitter.bridge.uiManager];
33
+		return [[StackTransitionDelegate alloc] initWithScreenTransition:toVC.resolveOptions.animations.push bridge:_eventEmitter.bridge];
34 34
 	} else if (operation == UINavigationControllerOperationPop && fromVC.resolveOptions.animations.pop.hasCustomAnimation) {
35
-		return [[StackTransitionDelegate alloc] initWithScreenTransition:fromVC.resolveOptions.animations.pop uiManager:_eventEmitter.bridge.uiManager];
35
+		return [[StackTransitionDelegate alloc] initWithScreenTransition:fromVC.resolveOptions.animations.pop bridge:_eventEmitter.bridge];
36 36
 	} else {
37 37
 		return nil;
38 38
 	}

+ 1
- 1
lib/ios/StackTransitionDelegate.h Zobrazit soubor

@@ -5,6 +5,6 @@
5 5
 
6 6
 @interface StackTransitionDelegate : TransitionDelegate
7 7
 
8
-- (instancetype)initWithScreenTransition:(RNNScreenTransition *)screenTransition uiManager:(RCTUIManager *)uiManager;
8
+- (instancetype)initWithScreenTransition:(RNNScreenTransition *)screenTransition bridge:(RCTBridge *)bridge;
9 9
 
10 10
 @end

+ 2
- 2
lib/ios/StackTransitionDelegate.m Zobrazit soubor

@@ -7,8 +7,8 @@
7 7
     RNNScreenTransition* _screenTransition;
8 8
 }
9 9
 
10
-- (instancetype)initWithScreenTransition:(RNNScreenTransition *)screenTransition uiManager:(RCTUIManager *)uiManager {
11
-    self = [super initWithUIManager:uiManager];
10
+- (instancetype)initWithScreenTransition:(RNNScreenTransition *)screenTransition bridge:(RCTBridge *)bridge {
11
+    self = [super initWithBridge:bridge];
12 12
     _screenTransition = screenTransition;
13 13
     return self;
14 14
 }

+ 1
- 1
lib/ios/TransitionDelegate.h Zobrazit soubor

@@ -5,7 +5,7 @@
5 5
 
6 6
 @interface TransitionDelegate : NSObject <UIViewControllerTransitioningDelegate, UIViewControllerAnimatedTransitioning, RCTUIManagerObserver>
7 7
 
8
-- (instancetype)initWithUIManager:(RCTUIManager *)uiManager;
8
+- (instancetype)initWithBridge:(RCTBridge *)bridge;
9 9
 
10 10
 - (NSArray *)createTransitionsFromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC containerView:(UIView *)containerView;
11 11
 

+ 4
- 4
lib/ios/TransitionDelegate.m Zobrazit soubor

@@ -2,19 +2,19 @@
2 2
 #import "DisplayLinkAnimator.h"
3 3
 
4 4
 @implementation TransitionDelegate {
5
-    RCTUIManager* _uiManager;
5
+    RCTBridge* _bridge;
6 6
     id <UIViewControllerContextTransitioning> _transitionContext;
7 7
     BOOL _animate;
8 8
 }
9 9
 
10
-- (instancetype)initWithUIManager:(RCTUIManager *)uiManager {
10
+- (instancetype)initWithBridge:(RCTBridge *)bridge {
11 11
     self = [super init];
12
-    _uiManager = uiManager;
13
-    [_uiManager.observerCoordinator addObserver:self];
12
+    _bridge = bridge;
14 13
     return self;
15 14
 }
16 15
 
17 16
 - (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext {
17
+    [_bridge.uiManager.observerCoordinator addObserver:self];
18 18
     _animate = YES;
19 19
     _transitionContext = transitionContext;
20 20
     [self prepareTransitionContext:transitionContext];