Open markst opened 4 years ago
The statusBarHeight
could be the culprit here. If I replace the height with:
var statusBarHeight: CGFloat { return 0.0 }
The bar does behave how we like, however returning with the bar visible seems to break again:
Actually it seems that navigationController
resolves to nil upon viewDidDisappear
which results in stopFollowingScrollView()
not completing. Not sure if this is a iOS 13 change or fact I'm using contained navigation controller. Also wonder if scrollableView
should be a weak reference.
So a fix to second issue is to stop following on willDisappear:
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
if let navigationController = navigationController as? ScrollingNavigationController {
navigationController.showNavbar(animated: true)
navigationController.stopFollowingScrollView()
}
}
Hi @markst Thanks for the detective work. I reckon that the issues are related to the contained navigation, it's something that I never considered while building the lib, so I expect issues.
Seems that if I use a navigation controller as a child view controller, the scroll does not appear to work as expected: