Closed jordanpwood closed 4 years ago
Sorry, I submitted my report before I completed it! I now have all the information entered.
It looks like beta 5 fixed the problem where the layer color wasn't being updated after calling Segmentio.setup(...)
from inside traitCollectionDidChange(_ previousTraitCollection:)
. Before I close this issue, could you tell me if it is a good idea to be calling Segmentio.setup(...)
repeatedly for an instance of Segmentio
?
+1
Report
Report a bug
What did you do?
I want to start off by saying that this framework has been very useful to me, and I really appreciate your work!
I am adding dark mode support for iOS 13. I have supplied dynamic colors to setup my Segmentio view. when I change to dark mode and come back to my app, the selected tab is very large, like this:
If I call
Segmentio.setup(...)
after the mode has switched between light and dark mode (fromtraitCollectionDidChange(_ previousTraitCollection:)
, then everything is drawn in the right location and size, but the selected item color has not been updated; it is showing the same color as the previous mode. Here is a screenshot of the two tabs after switching from dark to light mode. The "A - Z" tab has the correct background and text color, the "Journal Rank" tab has the right text color, but it is supposed to be the lighter version of my dynamic color:What did you expect to happen?
There should be some way to update the view such that the layers accurately reflect the correct color for the current mode.
What happened instead?
The old color persists, even after calling
setup(..)
after the mode changed.Your Environment
Stack
Installation Source
Plugins
Podfile