CosmicMind / CosmicMind/Material

NavigationBar Jumping Problem

Open
#1,289 11 comments 6 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
12k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Hi guys, first of all, thanks for creating such a great UI library. I enjoy using this framework.
Recently, I saw a problem about when navigation back through the back button. The navigation bar is jumping when back button pressed. My code is not customized, it s from sample project. Can you help me to solve jumping?
![Screen Recording 2020-01-27 at 12 35 38 AM](https://user-images.githubusercontent.com/3720242/73142347-85aded00-409e-11ea-82b1-89601d39a54b.gif)

Main NavigationController code is below;

class AppNavigationController: NavigationController {
open override func prepare() {
super.prepare()
isMotionEnabled = true
guard let v = navigationBar as? NavigationBar else {
return
}

v.backgroundColor = .white
v.depthPreset = .none
v.dividerColor = Color.grey.lighten2
}

override var preferredStatusBarStyle: UIStatusBarStyle{
if #available(iOS 13.0, *) {
return .darkContent
} else {
return .default
}
}
}

These are the root ListViewController UI lifecycle functions. Nothing is special.

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
}

override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.