Skip to content

Screens: Show and hide New Post button on scroll#599

Open
awilfox wants to merge 3 commits into
TheBLVD:mainfrom
awilfox:awilfox/582-compose-button
Open

Screens: Show and hide New Post button on scroll#599
awilfox wants to merge 3 commits into
TheBLVD:mainfrom
awilfox:awilfox/582-compose-button

Conversation

@awilfox
Copy link
Copy Markdown

@awilfox awilfox commented Jun 27, 2024

The button hides when the user is scrolling to view older posts, and reappears when the user is scrolling to view newer posts.

Ref: #582

awilfox added 2 commits June 26, 2024 21:47
The button hides when the user is scrolling to view older posts, and
reappears when the user is scrolling to view newer posts.

Ref: TheBLVD#582
* Animation effect when the post button is shown or hidden based on scrolling.

  The button seems to "slide" in or out, and fades with alpha blending.  The
  animation is also rate-limited to once per second, to prevent 'jerking'
  when a user is fidgeting around.

* Use tableView:willDisplay:forRowAt: instead of scrollViewDidScroll: to
  change the post button state.

  This ensures that small adjustments to scroll don't make the post button
  change state, which can be distracting.

* Update the shown index path when the view model updates.
@awilfox
Copy link
Copy Markdown
Author

awilfox commented Jun 29, 2024

I have pushed a commit that also animates the change.

We no longer use the contentOffset to toggle the post button state.
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

Successfully merging this pull request may close these issues.

1 participant