nicklockwood / FXForms

[DEPRECATED]
Other
2.93k stars 339 forks source link

How to change the font for the gender field? #469

Open Tim77277 opened 7 years ago

Tim77277 commented 7 years ago

For the normal textfield, i was able to change the font and color by using

"textLabel.textColor": textFieldTheme.color, "textLabel.font": labelTheme.font, "textField.font": textFieldTheme.font, "textField.textColor": textFieldTheme.color

But when I tried to change the font for gender field, it says that the gender field doesn't have a key call textField. In this case is there any way that i can still change the font and color for the selected gender that is displayed?

ChrislosChen commented 7 years ago

the font for gender field,i found that this cell is kind of FXFormDefaultCell,and then you can config the cell in the - (NSArray *)fields method like this : @{FXFormFieldKey: @"gender", FXFormFieldOptions: @[@"Male", @"Female", @"It's Complicated"], @"detailTextLabel.font": [UIFont systemFontOfSize:12]} . In this way you can change the font and color for the selected gender that is displayed,@Tim77277