andreamazz / AMScrollingNavbar

Scrollable UINavigationBar that follows the scrolling of a UIScrollView
MIT License
6.05k stars 634 forks source link

Scroll when collapsed does not expand #379

Closed alexookah closed 4 years ago

alexookah commented 4 years ago

When you collapse the navbar and you are on top of the scrollView you cannot pull down the navbar. In previous versions it used to work.

https://streamable.com/bzlqd

In the demo i just removed the navigationItem.searchController Maybe when you added searchController support something is wrong when scrolling?

andreamazz commented 4 years ago

Hi @Alexookah I'm a bit confused, seems to be working fine here. I tried with the standard demo and by removing the search controller. Am I missing something?

alexookah commented 4 years ago

Hello @andreamazz Well this is a bit tricky. This only happens when there are followers and tested without searchController

(You have to scroll to top a little and release in order for tableView to scroll To top and maintain the navigationBar collapsed.)

One more way to try it you can add this code to scroll To Top when clicking on a tableView row: func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { self.tableView.scrollToRow(at: IndexPath(item: 0, section: 0), at: .top, animated: true) }

  1. Collapse the navigationBar
  2. Click on a row
  3. Try to scrollDown

It seems that it gets stuck and sometimes when you release it expands succesfully but most times it just re-collapses.

Check the new uploaded video in action: https://streamable.com/naljq

alexookah commented 4 years ago

this got fixed. closing issue