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

Wrong segmented state after highlighted state #34

Open
Vorgar opened this issue Apr 24, 2019 · 0 comments
Open

Wrong segmented state after highlighted state #34

Vorgar opened this issue Apr 24, 2019 · 0 comments

Comments

@Vorgar
Copy link

Vorgar commented Apr 24, 2019

There is another problem similar to issue #32 and related to the "didset" highlighted logic that affects the attributed title of the segment

To reproduce:

  1. Use text only as segmented style
  2. Have only 2 segments so that the segmented control does not scroll
  3. Set different title text attributes for normal, highlighted and selected states
  4. Tap and hold the selected segment that active is
  5. Slide the finger to left or right until the finger is in the next segment
  6. Lift the finger and the selected segment title stays in the normal attributed state when it should have the selected one

In my tests I have seen that the control can have the following combination states:

  • not selected, not highlighted (normal)
  • not selected, highlighted (only highlighted)
  • selected, not highlighted (only selected)
  • selected and highlighted (selected and highlighted)

I think that the priorities should be highlighted > selected > normal, that means that when isHighlighted is set to false we need to check if it is selected

This problem is present in other segmented styles too

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

1 participant