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

Fix blinking react view button

yogevbd 4 лет назад
Родитель
Сommit
d502c69443
1 измененных файлов: 2 добавлений и 0 удалений
  1. 2
    0
      lib/ios/RNNUIBarButtonItem.m

+ 2
- 0
lib/ios/RNNUIBarButtonItem.m Просмотреть файл

@@ -34,6 +34,7 @@
34 34
 	reactView.sizeFlexibility = RCTRootViewSizeFlexibilityWidthAndHeight;
35 35
 	reactView.delegate = self;
36 36
 	reactView.backgroundColor = [UIColor clearColor];
37
+    reactView.hidden = CGRectEqualToRect(reactView.frame, CGRectZero);
37 38
     
38 39
 	[NSLayoutConstraint deactivateConstraints:reactView.constraints];
39 40
 	self.widthConstraint = [NSLayoutConstraint constraintWithItem:reactView
@@ -67,6 +68,7 @@
67 68
 	self.heightConstraint.constant = rootView.intrinsicContentSize.height;
68 69
 	[rootView setNeedsUpdateConstraints];
69 70
 	[rootView updateConstraintsIfNeeded];
71
+    rootView.hidden = NO;
70 72
 }
71 73
 
72 74
 - (void)onButtonPressed {