BusyNavigationBar icon indicating copy to clipboard operation
BusyNavigationBar copied to clipboard

Bug while PullToRefresh is active (LargeTiles: On)

Open undeaDD opened this issue 6 years ago • 1 comments

When PullToRefresh is activated the Bars get drawn at the exact Position. But shortly after that the Navigationbar shrinks back to its minimum Size (when pulled too far). The Already started BusyNavigationBars do not shrink / move up. Instead they just stay there. Any way to get around that behavior? (Any way to wait till the navigationbar is shrinked again and then display the busybars ? idk)

image 2018-06-26 14 26 28

CodeBlock:

self.navigationController?.navigationBar.start(options) UIApplication.shared.isNetworkActivityIndicatorVisible = true Utils.reloadAdminData(completion: { (result) in DispatchQueue.main.async { self.data = result self.tableView.reloadData() UIApplication.shared.isNetworkActivityIndicatorVisible = false self.navigationController?.navigationBar.stop() self.refreshControl.endRefreshing() } })

undeaDD avatar Jun 26 '18 12:06 undeaDD

I figured out a small (not bugfree) workaround that works for me ;) Still would be great to see this fixed / implemented.

Functions that changed (backwards compatible): func insertLoadingView(_ largeTitle: Bool) -> to adjust for a larger navigationbar height

Trick: start animation on: "scrollViewDidEndScrollingAnimation" ( only once !!! -> gets called twice per pullToRefresh) stop before: "endRefreshing"

My Example Implementation: navbartest.zip

undeaDD avatar Jun 26 '18 18:06 undeaDD