How can I change color of editable text in FXForms? I've tried @"textLabel.color"
and @"detailTextLabel.color"
but it didn't work.
Asked
Active
Viewed 119 times
1
-
what is an FX form ? How you are using it in your view controller ? – Teja Nandamuri Dec 02 '15 at 14:09
-
you can simply change the tint color of the textfield!!! – Teja Nandamuri Dec 02 '15 at 14:13
-
2The arrow-marked element is not a label, it's a text field. You will probably need a different key. `@"textField.textColor"`? – Rok Jarc Dec 02 '15 at 14:16
-
@rokjarc Yes, you are right. It worked. Please write an answer and I will accept it :) – Kris Dec 02 '15 at 14:25
2 Answers
1
Change this line in the FXForms.m
file
Under FXFormTextFieldCell
implementation:
in - (void)setUp
method:
Or you can also override the setup method from your view controller
self.textField.textColor = [UIColor yourColor];//[UIColor colorWithRed:0.275f green:0.376f blue:0.522f alpha:1.000f];

Teja Nandamuri
- 11,045
- 6
- 57
- 109
-
FXforms can also be added to project by Cocoapods (for example). It's not a good idea to directly modify the library source - it defies the purpose of using dependency management. – Rok Jarc Dec 02 '15 at 14:23
-
Oh, i misunderstood that he should modify the source file. Sorry about that. Yes, overriding setup (in sublass) is also a valid approach. – Rok Jarc Dec 02 '15 at 14:31
1
It's important to use appropriate keyPath: in your case it should be
@{@"textField.textColor": [UIColor redColor]}

Rok Jarc
- 18,765
- 9
- 69
- 124