소스 검색

handle java notation to real objective c notation !

Ran Greenberg 7 년 전
부모
커밋
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