Browse Source

detach react topBar custom components

yogevbd 6 years ago
parent
commit
3b4e44b646
1 changed files with 15 additions and 11 deletions
  1. 15
    11
      lib/ios/RNNRootViewController.m

+ 15
- 11
lib/ios/RNNRootViewController.m View File

287
 
287
 
288
 - (UIViewController *)previewingContext:(id<UIViewControllerPreviewing>)previewingContext viewControllerForLocation:(CGPoint)location{
288
 - (UIViewController *)previewingContext:(id<UIViewControllerPreviewing>)previewingContext viewControllerForLocation:(CGPoint)location{
289
 	if (self.previewController) {
289
 	if (self.previewController) {
290
-//		RNNRootViewController * vc = (RNNRootViewController*) self.previewController;
291
-//		[_eventEmitter sendOnNavigationEvent:@"previewContext" params:@{
292
-//																		@"previewComponentId": vc.componentId,
293
-//																		@"componentId": self.componentId
294
-//																		}];
290
+		//		RNNRootViewController * vc = (RNNRootViewController*) self.previewController;
291
+		//		[_eventEmitter sendOnNavigationEvent:@"previewContext" params:@{
292
+		//																		@"previewComponentId": vc.componentId,
293
+		//																		@"componentId": self.componentId
294
+		//																		}];
295
 	}
295
 	}
296
 	return self.previewController;
296
 	return self.previewController;
297
 }
297
 }
299
 
299
 
300
 - (void)previewingContext:(id<UIViewControllerPreviewing>)previewingContext commitViewController:(UIViewController *)viewControllerToCommit {
300
 - (void)previewingContext:(id<UIViewControllerPreviewing>)previewingContext commitViewController:(UIViewController *)viewControllerToCommit {
301
 	RNNRootViewController * vc = (RNNRootViewController*) self.previewController;
301
 	RNNRootViewController * vc = (RNNRootViewController*) self.previewController;
302
-//	NSDictionary * params = @{
303
-//							  @"previewComponentId": vc.componentId,
304
-//							  @"componentId": self.componentId
305
-//							  };
302
+	//	NSDictionary * params = @{
303
+	//							  @"previewComponentId": vc.componentId,
304
+	//							  @"componentId": self.componentId
305
+	//							  };
306
 	if (vc.options.preview.commit) {
306
 	if (vc.options.preview.commit) {
307
-//		[_eventEmitter sendOnNavigationEvent:@"previewCommit" params:params];
307
+		//		[_eventEmitter sendOnNavigationEvent:@"previewCommit" params:params];
308
 		[self.navigationController pushViewController:vc animated:false];
308
 		[self.navigationController pushViewController:vc animated:false];
309
 	} else {
309
 	} else {
310
-//		[_eventEmitter sendOnNavigationEvent:@"previewDismissed" params:params];
310
+		//		[_eventEmitter sendOnNavigationEvent:@"previewDismissed" params:params];
311
 	}
311
 	}
312
 }
312
 }
313
 
313
 
367
 	[[NSNotificationCenter defaultCenter] removeObserver:self];
367
 	[[NSNotificationCenter defaultCenter] removeObserver:self];
368
 	[[NSNotificationCenter defaultCenter] removeObserver:self.view];
368
 	[[NSNotificationCenter defaultCenter] removeObserver:self.view];
369
 	self.view = nil;
369
 	self.view = nil;
370
+	self.navigationItem.titleView = nil;
371
+	_customTopBar = nil;
372
+	_customTitleView = nil;
373
+	_customTopBarBackground = nil;
370
 }
374
 }
371
 
375
 
372
 @end
376
 @end