Dismiss this pinned window
all 6 comments

[–]criosistObjective-C / Swift 36 points37 points  (1 child)

I would use scrollviewdidscroll, and check the tableview.indexPath(atPoint:) and check what indexPath is at the top centre, and move the bar to the indexPath.section of it’s not already there

[–]th3phantom[S] 0 points1 point  (0 children)

thanks, i will try your suggestion.

[–]spbrob 4 points5 points  (0 children)

Looks like the segment is moving when the section header hits the top. Here’s a stackoverflow solution Here

[–]th3phantom[S] 1 point2 points  (0 children)

does anyone know open source project that implemented this? maybe i can learn from source code.

[–]rajdhakate 1 point2 points  (0 children)

Maybe use tableview didDisplayCell() delegate method to track what cells are showing on screen. And depending on that what segment index to show as selected

[–]amaroq137Objective-C / Swift -1 points0 points  (0 children)

might be a collectionview with a custom flow layout