Procházet zdrojové kódy

center customTitleView fixed for xcode 8 builds

yogevbd před 7 roky
rodič
revize
0c8054b8ff
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1
    1
      ios/RCCCustomTitleView.m

+ 1
- 1
ios/RCCCustomTitleView.m Zobrazit soubor

54
 
54
 
55
 - (void)rootViewDidChangeIntrinsicSize:(RCTRootView *)rootView {
55
 - (void)rootViewDidChangeIntrinsicSize:(RCTRootView *)rootView {
56
     if ([self.alignment isEqualToString:@"center"]) {
56
     if ([self.alignment isEqualToString:@"center"]) {
57
-        [self setFrame:CGRectMake(0, 0, rootView.intrinsicContentSize.width, rootView.intrinsicContentSize.height)];
57
+        [self setFrame:CGRectMake(self.frame.origin.x, self.frame.origin.y, self.subView.intrinsicContentSize.width, self.subView.intrinsicContentSize.height)];
58
         [self.subView setFrame:CGRectMake(0, 0, rootView.intrinsicContentSize.width, rootView.intrinsicContentSize.height)];
58
         [self.subView setFrame:CGRectMake(0, 0, rootView.intrinsicContentSize.width, rootView.intrinsicContentSize.height)];
59
     }
59
     }
60
 }
60
 }