Skip to content

Use TapActionCell's tintColor as its label textColor#13

Merged
bcylin merged 1 commit into
bcylin:developfrom
sanekgusev:fix-tap-action-cell-tint-color
Mar 20, 2018
Merged

Use TapActionCell's tintColor as its label textColor#13
bcylin merged 1 commit into
bcylin:developfrom
sanekgusev:fix-tap-action-cell-tint-color

Conversation

@sanekgusev
Copy link
Copy Markdown
Contributor

This PR attempts to fix a pretty minor issue of TapActionCell's textLabel not following the modified tintColor when setting a custom tintColor on the application's main UIWindow instance (which is a somewhat common approach to theming the entire app).

Since currently the text color is derived from a temporarily created button which is never inserted into the view hierarchy, it stays equal to the default system tint color, not the (potentially) overridden one.

After this change, the label's text color will follow its TapActionCell's tintColor which sounds like intended and reasonable behavior to me.

The downside is that overriding this text color via UIAppearance will now need to be done by manipulating TapActionCell's tintColor property though the cell's appearance proxy, and not directly through UILabel's proxy (since UIAppearance will notice the property having already been modified by the cell and will not proceed with update).

Copy link
Copy Markdown
Owner

@bcylin bcylin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is way better than the temporary button. Thank you very much 👍

@bcylin bcylin merged commit fc3704a into bcylin:develop Mar 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants