Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bcb42ac

Browse filesBrowse files
committed
Hidable mimicrate bar.
1 parent cefa01c commit bcb42ac
Copy full SHA for bcb42ac

File tree

Expand file treeCollapse file tree

1 file changed

+22
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+22
-0
lines changed

‎Sources/NativeUIKit/Controllers/Navigation/NativeNavigationController.swift

Copy file name to clipboardExpand all lines: Sources/NativeUIKit/Controllers/Navigation/NativeNavigationController.swift
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,28 @@ open class NativeNavigationController: SPNavigationController {
4040
}
4141
}
4242

43+
open override func setToolbarHidden(_ hidden: Bool, animated: Bool) {
44+
if let barView = mimicrateToolBarView {
45+
if animated {
46+
47+
if barView.isHidden && !hidden {
48+
barView.isHidden = false
49+
barView.alpha = .zero
50+
}
51+
52+
UIView.animate(withDuration: 0.12, delay: .zero, options: [.beginFromCurrentState, .curveEaseInOut], animations: {
53+
barView.alpha = hidden ? .zero : 1
54+
}) { completed in
55+
barView.isHidden = hidden
56+
}
57+
} else {
58+
barView.isHidden = hidden
59+
}
60+
} else {
61+
super.setToolbarHidden(hidden, animated: animated)
62+
}
63+
}
64+
4365
// MARK: - Layout
4466

4567
open override func viewDidLayoutSubviews() {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.