Skip to content
This repository has been archived by the owner on Mar 7, 2021. It is now read-only.

How to change backgroundColor in code? #540

Open
shiweifu opened this issue Sep 24, 2016 · 1 comment
Open

How to change backgroundColor in code? #540

shiweifu opened this issue Sep 24, 2016 · 1 comment

Comments

@shiweifu
Copy link

Hi.

I want to change the FORMButtonFieldCell's backgroundColor in running and I implemented the dataSource's "fieldUpdatedBlock" in Controller.

But When I call the ButtonFieldCell's "setBackgroundColor", It not change the field's color.

My code:

            formCell.setBackgroundColor(UIColor.greenColor())

I try to change the HighlightBackgroundColor, It works.
I try to define a style attribute in JSON file with the Field, It also works.

So, How can I change the Field's backgroundColor in coding?

@jeffleeismyhero
Copy link
Collaborator

At first glance, it looks like the original style color is overriding your custom color. Are you setting the initial value for highlighted_background_color?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants