Browse Source

handle java notation to real objective c notation !

Ran Greenberg 8 years ago
parent
commit
58c26bcafd
4 changed files with 6 additions and 6 deletions
  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 View File

38
 
38
 
39
 -(void)assertReady
39
 -(void)assertReady
40
 {
40
 {
41
-	if (!RNN.instance.isReadyToReceiveCommands) {
41
+	if (![RNN instance].isReadyToReceiveCommands) {
42
 		@throw [NSException exceptionWithName:@"BridgeNotLoadedError" reason:@"Bridge not yet loaded! Send commands after Navigation.events().onAppLaunched() has been called." userInfo:nil];
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 View File

36
 
36
 
37
 -(void)send:(NSString *)eventName body:(id)body
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
 @end
42
 @end

+ 3
- 3
ios/RNNRootViewController.m View File

16
 	self.containerId = node.nodeId;
16
 	self.containerId = node.nodeId;
17
 	self.containerName = node.data[@"name"];
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
 										 moduleName:self.containerName
20
 										 moduleName:self.containerName
21
 								  initialProperties:@{@"id": self.containerId}];
21
 								  initialProperties:@{@"id": self.containerId}];
22
 	return self;
22
 	return self;
25
 -(void)viewDidAppear:(BOOL)animated
25
 -(void)viewDidAppear:(BOOL)animated
26
 {
26
 {
27
 	[super viewDidAppear:animated];
27
 	[super viewDidAppear:animated];
28
-	[RNN.instance.eventEmitter sendContainerStart:self.containerId];
28
+	[[RNN instance].eventEmitter sendContainerStart:self.containerId];
29
 }
29
 }
30
 
30
 
31
 -(void)viewDidDisappear:(BOOL)animated
31
 -(void)viewDidDisappear:(BOOL)animated
32
 {
32
 {
33
 	[super viewDidDisappear:animated];
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 View File

12
 
12
 
13
 +(void)bootstrap:(NSURL *)jsCodeLocation launchOptions:(NSDictionary *)launchOptions
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
 @end
18
 @end