andreamazz / andreamazz/AMScrollingNavbar
ScrollView sometimes doesn't get back to it's default position.
- Lenguaje dominante
- Swift
- Estrellas
- 6k
- Forks
- 628
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.