Преглед на файлове

Fix react view button flicking (#5301)

Yogev Ben David преди 5 години
родител
ревизия
43a86bbb3b
No account linked to committer's email address
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2
    0
      lib/ios/RNNUIBarButtonItem.m

+ 2
- 0
lib/ios/RNNUIBarButtonItem.m Целия файл

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