Browse Source

Fix react view button flicking (#5301)

Yogev Ben David 5 years ago
parent
commit
43a86bbb3b
No account linked to committer's email address
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      lib/ios/RNNUIBarButtonItem.m

+ 2
- 0
lib/ios/RNNUIBarButtonItem.m View File

@@ -31,6 +31,7 @@
31 31
 -(instancetype)init:(NSString*)buttonId withCustomView:(RCTRootView *)reactView {
32 32
 	self = [super initWithCustomView:reactView];
33 33
 	
34
+	reactView.hidden = YES;
34 35
 	reactView.sizeFlexibility = RCTRootViewSizeFlexibilityWidthAndHeight;
35 36
 	reactView.delegate = self;
36 37
 	reactView.backgroundColor = [UIColor clearColor];
@@ -61,6 +62,7 @@
61 62
 }
62 63
 
63 64
 - (void)rootViewDidChangeIntrinsicSize:(RCTRootView *)rootView {
65
+	rootView.hidden = NO;
64 66
 	self.widthConstraint.constant = rootView.intrinsicContentSize.width;
65 67
 	self.heightConstraint.constant = rootView.intrinsicContentSize.height;
66 68
 	[rootView setFrame:CGRectMake(0, 0, rootView.intrinsicContentSize.width, rootView.intrinsicContentSize.height)];