|
@@ -123,13 +123,17 @@
|
123
|
123
|
|
124
|
124
|
NSNumber* fontSize = [self fontSize:dictionary[@"fontSize"] defaultFontSize:_defaultButtonStyle.fontSize];
|
125
|
125
|
NSString* fontFamily = [self fontFamily:dictionary[@"fontFamily"] defaultFontFamily:_defaultButtonStyle.fontFamily];
|
|
126
|
+ UIFont *font = nil;
|
126
|
127
|
if (fontFamily) {
|
127
|
|
- [textAttributes setObject:[UIFont fontWithName:fontFamily size:[fontSize floatValue]] forKey:NSFontAttributeName];
|
128
|
|
- } else{
|
129
|
|
- [textAttributes setObject:[UIFont systemFontOfSize:[fontSize floatValue]] forKey:NSFontAttributeName];
|
|
128
|
+ font = [UIFont fontWithName:fontFamily size:[fontSize floatValue]];
|
|
129
|
+ } else {
|
|
130
|
+ font = [UIFont systemFontOfSize:[fontSize floatValue]];
|
130
|
131
|
}
|
|
132
|
+ [textAttributes setObject:font forKey:NSFontAttributeName];
|
|
133
|
+ [disabledTextAttributes setObject:font forKey:NSFontAttributeName];
|
131
|
134
|
|
132
|
135
|
[barButtonItem setTitleTextAttributes:textAttributes forState:UIControlStateNormal];
|
|
136
|
+ [barButtonItem setTitleTextAttributes:textAttributes forState:UIControlStateHighlighted];
|
133
|
137
|
[barButtonItem setTitleTextAttributes:disabledTextAttributes forState:UIControlStateDisabled];
|
134
|
138
|
|
135
|
139
|
NSString *testID = dictionary[@"testID"];
|