Parcourir la source

Fix topBar.title.component on iOS 10

yogevbd il y a 5 ans
Parent
révision
82e48079dc
1 fichiers modifiés avec 11 ajouts et 11 suppressions
  1. 11
    11
      lib/ios/RNNReactView.m

+ 11
- 11
lib/ios/RNNReactView.m Voir le fichier

@@ -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