Просмотр исходного кода

handle java notation to real objective c notation !

Ran Greenberg 7 лет назад
Родитель
Сommit
58c26bcafd
4 измененных файлов: 6 добавлений и 6 удалений
  1. 1
    1
      ios/RNNBridgeModule.m
  2. 1
    1
      ios/RNNEventEmitter.m
  3. 3
    3
      ios/RNNRootViewController.m
  4. 1
    1
      ios/ReactNativeNavigation.m

+ 1
- 1
ios/RNNBridgeModule.m Просмотреть файл

@@ -38,7 +38,7 @@ RCT_EXPORT_METHOD(pop:(NSString*)containerId)
38 38
 
39 39
 -(void)assertReady
40 40
 {
41
-	if (!RNN.instance.isReadyToReceiveCommands) {
41
+	if (![RNN instance].isReadyToReceiveCommands) {
42 42
 		@throw [NSException exceptionWithName:@"BridgeNotLoadedError" reason:@"Bridge not yet loaded! Send commands after Navigation.events().onAppLaunched() has been called." userInfo:nil];
43 43
 	}
44 44
 }

+ 1
- 1
ios/RNNEventEmitter.m Просмотреть файл

@@ -36,7 +36,7 @@ static NSString* const containerStop	= @"RNN.containerStop";
36 36
 
37 37
 -(void)send:(NSString *)eventName body:(id)body
38 38
 {
39
-	[[RNN.instance.bridge moduleForClass:[RNNEventEmitter class]] sendEventWithName:eventName body:body];
39
+	[[[RNN instance].bridge moduleForClass:[RNNEventEmitter class]] sendEventWithName:eventName body:body];
40 40
 }
41 41
 
42 42
 @end

+ 3
- 3
ios/RNNRootViewController.m Просмотреть файл

@@ -16,7 +16,7 @@
16 16
 	self.containerId = node.nodeId;
17 17
 	self.containerName = node.data[@"name"];
18 18
 	
19
-	self.view = [[RCTRootView alloc] initWithBridge:RNN.instance.bridge
19
+	self.view = [[RCTRootView alloc] initWithBridge:[RNN instance].bridge
20 20
 										 moduleName:self.containerName
21 21
 								  initialProperties:@{@"id": self.containerId}];
22 22
 	return self;
@@ -25,13 +25,13 @@
25 25
 -(void)viewDidAppear:(BOOL)animated
26 26
 {
27 27
 	[super viewDidAppear:animated];
28
-	[RNN.instance.eventEmitter sendContainerStart:self.containerId];
28
+	[[RNN instance].eventEmitter sendContainerStart:self.containerId];
29 29
 }
30 30
 
31 31
 -(void)viewDidDisappear:(BOOL)animated
32 32
 {
33 33
 	[super viewDidDisappear:animated];
34
-	[RNN.instance.eventEmitter sendContainerStop:self.containerId];
34
+	[[RNN instance].eventEmitter sendContainerStop:self.containerId];
35 35
 }
36 36
 
37 37
 

+ 1
- 1
ios/ReactNativeNavigation.m Просмотреть файл

@@ -12,7 +12,7 @@
12 12
 
13 13
 +(void)bootstrap:(NSURL *)jsCodeLocation launchOptions:(NSDictionary *)launchOptions
14 14
 {	
15
-	[RNN.instance bootstrap:jsCodeLocation launchOptions:launchOptions];
15
+	[[RNN instance] bootstrap:jsCodeLocation launchOptions:launchOptions];
16 16
 }
17 17
 
18 18
 @end