Skip to content

Commit b12d38e

Browse files
[iOS] fix activeFontStyle prop being override by fontStyle (#96)
1 parent 199ab5a commit b12d38e

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

ios/RNCSegmentedControlManager.m

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,18 @@ - (UIView *)view {
3838
NSInteger fontSize =
3939
json[@"fontSize"] ? [RCTConvert NSInteger:json[@"fontSize"]] : 13.0;
4040
UIFont *font = [UIFont systemFontOfSize:fontSize];
41-
UIFont *activeFont = [UIFont boldSystemFontOfSize:fontSize];
4241
if (json[@"fontFamily"]) {
4342
UIFont *tempFont = [UIFont fontWithName:json[@"fontFamily"]
4443
size:fontSize];
4544
if (tempFont != nil) {
4645
font = tempFont;
47-
activeFont = tempFont;
4846
}
4947
}
5048

5149
NSDictionary *attributes = [NSDictionary
5250
dictionaryWithObjectsAndKeys:font, NSFontAttributeName, color,
5351
NSForegroundColorAttributeName, nil];
54-
NSDictionary *activeAttributes = [NSDictionary
55-
dictionaryWithObjectsAndKeys:activeFont, NSFontAttributeName, color,
56-
NSForegroundColorAttributeName, nil];
5752
[view setTitleTextAttributes:attributes forState:UIControlStateNormal];
58-
[view setTitleTextAttributes:activeAttributes
59-
forState:UIControlStateSelected];
6053
}
6154
}
6255
#endif

0 commit comments

Comments
 (0)