@capgo/capacitor-native-navigation 8.2.7 → 8.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -231,8 +231,7 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
231
231
|
self.applyTabBarAppearance(tabBar: tabBar, options: call)
|
|
232
232
|
if items.isEmpty {
|
|
233
233
|
self.tabbarVisible = false
|
|
234
|
-
self.
|
|
235
|
-
self.tabBarController?.view.isHidden = true
|
|
234
|
+
self.hideSystemTabBarChromeCompletely()
|
|
236
235
|
} else {
|
|
237
236
|
self.showTabBarChrome(tabBar)
|
|
238
237
|
}
|
|
@@ -871,21 +870,46 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
871
870
|
return
|
|
872
871
|
}
|
|
873
872
|
|
|
873
|
+
let tabBar = tabBarController.tabBar
|
|
874
874
|
if #available(iOS 18.0, *) {
|
|
875
875
|
tabBarController.setTabBarHidden(hidden, animated: false)
|
|
876
876
|
} else {
|
|
877
|
-
|
|
877
|
+
tabBar.isHidden = hidden
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
if hidden {
|
|
881
|
+
setTabBarBackgroundSubviewsHidden(true, on: tabBar)
|
|
882
|
+
} else {
|
|
883
|
+
setTabBarBackgroundSubviewsHidden(false, on: tabBar)
|
|
884
|
+
tabBar.setNeedsLayout()
|
|
885
|
+
tabBar.layoutIfNeeded()
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
private func setTabBarBackgroundSubviewsHidden(_ hidden: Bool, on tabBar: UITabBar) {
|
|
890
|
+
tabBar.isHidden = hidden
|
|
891
|
+
tabBar.alpha = hidden ? 0 : 1
|
|
892
|
+
tabBar.isUserInteractionEnabled = !hidden
|
|
893
|
+
tabBar.subviews.forEach { subview in
|
|
894
|
+
subview.isHidden = hidden
|
|
895
|
+
subview.alpha = hidden ? 0 : 1
|
|
878
896
|
}
|
|
879
897
|
}
|
|
880
898
|
|
|
899
|
+
private func hideSystemTabBarChromeCompletely() {
|
|
900
|
+
applySystemTabBarItems([], selectedIndex: nil, animated: false)
|
|
901
|
+
setSystemTabBarHidden(true)
|
|
902
|
+
tabBarController?.view.isHidden = true
|
|
903
|
+
tabContainer?.isHidden = true
|
|
904
|
+
floatingTabBar?.isHidden = true
|
|
905
|
+
}
|
|
906
|
+
|
|
881
907
|
private func hideTabBarChrome() {
|
|
882
908
|
if usesSystemLiquidGlass && tabbarStyle.shape != .curve {
|
|
883
|
-
|
|
884
|
-
tabBarController?.view.isHidden = false
|
|
885
|
-
hostWebViewInSelectedSystemTab()
|
|
909
|
+
hideSystemTabBarChromeCompletely()
|
|
886
910
|
} else {
|
|
887
|
-
|
|
888
|
-
|
|
911
|
+
restoreWebViewFromSystemTabController()
|
|
912
|
+
hideSystemTabBarChromeCompletely()
|
|
889
913
|
tabBar?.isHidden = true
|
|
890
914
|
}
|
|
891
915
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-native-navigation",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.9",
|
|
4
4
|
"description": "Capacitor plugin for native navbar, tabbar, safe-area handling, and WebView snapshot transitions.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|