andreamazz / andreamazz/AMScrollingNavbar

ScrollView sometimes doesn't get back to it's default position.

Aberta
#311 10 comentários 2 reações 0 responsáveis Ver no GitHub
awaiting feedback
Linguagem predominante
Swift
Estrelas
6k
Forks
628
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Hello.

Am am using this framework with `WKWebView` to minimize `Navigation Bar` when scrolling downwards. I am facing a problem when `Navigation Bar` has its full height, but my web view is offset as if the bar has its small height.

[Here](https://youtu.be/IweFHCFsJKA) is the video, where everything works fine.
And [here](https://youtu.be/TdTl36lV9eU) is the video, where the behaviour is undesired.

To use the framework I've added the following lines into `View Controller` that manages `WKWebView`:

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// My other code
// ...
guard let navigator = navigationController as? ScrollingNavigationController else { return }
navigator.followScrollView(webView.scrollView, delay: 55.0)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
guard let navigator = navigationController as? ScrollingNavigationController else { return }
navigator.stopFollowingScrollView()
}

`webView` is a `UIView` that has `WKWebView` instance inside its view hierarchy, as well as some other views. It's `scrollView` property simply returns `WKWebView` instance's `scrollView` property.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.