You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I set different background colors and text colors for normal content/style and selected content/style. Background colors always display correct, but the text color is reset when scrolling a tableView with a TTGTextTagCollectionView for each cell. So when the cell re-renders in cellForRowAt, the text color is almost always black. I set it to be white on selected tags.
The text was updated successfully, but these errors were encountered:
It's hard to provide any demo code, because the app I'm working on has some fairly complex UI. That may also be the source of my problem. I did however make a sample app, with only one view controller with a table view, listing tags in several sections, thus rendering n number of TTGTextTagCollectionViews. That worked fine.
After som debugging in the app I'm working on I found that the text color in TTGTextTagStringContent wasn't reset back to the normal color I set (dark gray). It was reset back to black, which I'm not sure where comes from.
I'm not sure what causes the problem, if it is my code or the code in the package, or even a combination. Life cycle events. Race conditions. I'm out of options.
Thanks for your time, though.
I attached an image showing the problem in action.
I had the same issue I didn't notice that you can set content and selectedContent separately for a tag leaving this here for anyone in the future let tag = TTGTextTag.init() tag.content = content tag.selectedContent = selectedContent
I set different background colors and text colors for normal content/style and selected content/style. Background colors always display correct, but the text color is reset when scrolling a
tableView
with aTTGTextTagCollectionView
for each cell. So when the cell re-renders incellForRowAt
, the text color is almost always black. I set it to be white on selected tags.The text was updated successfully, but these errors were encountered: