OfTheWolf / TwitterProfile

Nested scrolling with pager just like in Twitter and Instagram profile.
MIT License
266 stars 45 forks source link

The table view cell not get deselect after touch #27

Closed MainasuK closed 2 years ago

MainasuK commented 2 years ago

Hi~

I'm trying to figure out what's make the table view cell still selected when touch end. It looks like some hack prevents tableView deselect the cell.

I record a video to reproduce this.

  1. Tap quickly or hold then release the finger on the cell.
  2. The cell gets highlighted

Expect: The cell should go back to the normal style after touching.

https://user-images.githubusercontent.com/7940186/136955015-06223c5c-89e8-4f5e-b13d-5c517362494e.mp4

MainasuK commented 2 years ago

Sorry.

I think the demo app did not fit my case. I push to another view controller when tableView delegate tableView(_:didSelectRowAt:) called. And it's maybe another issue from the paging framework I use.


Update:

The Pageboy framework nest in the bottomVC somehow makes the UITableViewCell highlighted during swipe (and cancel swipe in the middle of navigation to next tab) . But call indexPathForSelectedRow on tableView just return nil. Finally, I setHighlighted on all visible cells when paging begins to scroll to fix this issue.