andreamazz / andreamazz/AMScrollingNavbar

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

Ouverte
#311 10 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
awaiting feedback
Langage dominant
Swift
Étoiles
6k
Forks
628
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.