Skip to content

Commit

Permalink
Hidable mimicrate bar.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvorobei committed Mar 22, 2022
1 parent cefa01c commit bcb42ac
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,28 @@ open class NativeNavigationController: SPNavigationController {
}
}

open override func setToolbarHidden(_ hidden: Bool, animated: Bool) {
if let barView = mimicrateToolBarView {
if animated {

if barView.isHidden && !hidden {
barView.isHidden = false
barView.alpha = .zero
}

UIView.animate(withDuration: 0.12, delay: .zero, options: [.beginFromCurrentState, .curveEaseInOut], animations: {
barView.alpha = hidden ? .zero : 1
}) { completed in
barView.isHidden = hidden
}
} else {
barView.isHidden = hidden
}
} else {
super.setToolbarHidden(hidden, animated: animated)
}
}

// MARK: - Layout

open override func viewDidLayoutSubviews() {
Expand Down

0 comments on commit bcb42ac

Please sign in to comment.