Browse Source

Fix topBar.title.component on iOS 10

yogevbd 5 years ago
parent
commit
82e48079dc
1 changed files with 11 additions and 11 deletions
  1. 11
    11
      lib/ios/RNNReactView.m

+ 11
- 11
lib/ios/RNNReactView.m View File

@@ -54,17 +54,17 @@
54 54
 }
55 55
 
56 56
 - (void)setAlignment:(NSString *)alignment inFrame:(CGRect)frame {
57
-	if ([alignment isEqualToString:@"fill"]) {
58
-		_fillParent = YES;
59
-		self.translatesAutoresizingMaskIntoConstraints = NO;
60
-		self.sizeFlexibility = RCTRootViewSizeFlexibilityNone;
61
-	} else {
62
-		self.sizeFlexibility = RCTRootViewSizeFlexibilityWidthAndHeight;
63
-		__weak RNNReactView *weakSelf = self;
64
-		[self setRootViewDidChangeIntrinsicSize:^(CGSize intrinsicSize) {
65
-			[weakSelf setFrame:CGRectMake(0, 0, intrinsicSize.width, intrinsicSize.height)];
66
-		}];
67
-	}
57
+    if ([alignment isEqualToString:@"fill"]) {
58
+        _fillParent = YES;
59
+        self.frame = frame;
60
+        self.sizeFlexibility = RCTRootViewSizeFlexibilityNone;
61
+    } else {
62
+        self.sizeFlexibility = RCTRootViewSizeFlexibilityWidthAndHeight;
63
+        __weak RNNReactView *weakSelf = self;
64
+        [self setRootViewDidChangeIntrinsicSize:^(CGSize intrinsicSize) {
65
+            [weakSelf setFrame:CGRectMake(0, 0, intrinsicSize.width, intrinsicSize.height)];
66
+        }];
67
+    }
68 68
 }
69 69
 
70 70
 @end