Browse Source

[iOS] Correctly size subtitle label before calculating title view width (#928)

grin 7 years ago
parent
commit
d100d43924
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      ios/Helpers/RCCTitleViewHelper.m

+ 2
- 1
ios/Helpers/RCCTitleViewHelper.m View File

156
     CGRect labelframe = subtitleLabel.frame;
156
     CGRect labelframe = subtitleLabel.frame;
157
     labelframe.size = labelSize;
157
     labelframe.size = labelSize;
158
     subtitleLabel.frame = labelframe;
158
     subtitleLabel.frame = labelframe;
159
-    
159
+    [subtitleLabel sizeToFit];
160
+
160
     [self.titleView addSubview:subtitleLabel];
161
     [self.titleView addSubview:subtitleLabel];
161
     
162
     
162
     return subtitleLabel;
163
     return subtitleLabel;