How to access placeholder text color of XLFormRowDescriptor

228 views Asked by At

So, I know how to set the placeholder text of a XLFormRowDescriptor item:

[rowZIPCodeInput.cellConfig setObject:@"wheee" forKey:@"textField.placeholder"];

I can edit the color of the text using

[rowZIPCodeInput.cellConfig setObject:[UIColor pp_yellow] forKey:@"textLabel.textColor"];

But I can't figure out how to edit the color of the placeholder text. Is something like

[rowZIPCodeInput.cellConfig setObject:[UIColor pp_yellow] forKey:@"textField.placeholder.textColor"];

possible?

1

There are 1 answers

0
highboi On BEST ANSWER
XLFormRowDescriptor * row = ......
NSAttributedString *string = ....
[row.cellConfig setObject:string forKey:@"textField.attributedPlaceholder"];

https://github.com/xmartlabs/XLForm/issues/241

use an attributed string