andreamazz / andreamazz/AMScrollingNavbar
ScrollView sometimes doesn't get back to it's default position.
- Vorherrschende Sprache
- Swift
- Sterne
- 6k
- Forks
- 628
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.