Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing subtitles with multiple SwitchRow elements #50

Closed
dnicolson opened this issue Jun 25, 2020 · 2 comments
Closed

Missing subtitles with multiple SwitchRow elements #50

dnicolson opened this issue Jun 25, 2020 · 2 comments

Comments

@dnicolson
Copy link
Contributor

When using multiple SwitchRow elements, subtitles can be hidden at random.

In the following example the "Setting14" row is missing the subtitle:

Screen Shot 2020-06-25 at 18 28 42

This has been tested in the following environments:
Xcode 11.3.1 (11C504) on macOS 10.14.6 (18G3020)
Xcode 11.5 (11E608c) on macOS 11.0 Beta (20A4299v)

This looks like it may be an Apple bug as the behaviour is somewhat erratic.

@dnicolson dnicolson changed the title Missing subtitles when multiple SwitchRow elements are used Missing subtitles with multiple SwitchRow elements Jun 25, 2020
@bcylin
Copy link
Owner

bcylin commented Jun 25, 2020

@dnicolson thanks much for spotting this bug! 👍

I think it's caused by the same cell reuse identifier that's set to different cell types.

In the sample code you provide, the first row's cell style is .default while the other rows are .subtitle. But their cell reuse identifiers are all the same T.cellIdentifier. When the first cell is reused for another row after scrolling, its detail text label is not properly displayed.

I added a fix at 2976336. Please let me know if this solves the problem. Thanks!

@dnicolson
Copy link
Contributor Author

Looks good to me, thanks for the quick fix!

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

No branches or pull requests

2 participants