@capgo/capacitor-native-navigation 8.4.1 → 8.4.2
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.
|
@@ -70,6 +70,7 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
70
70
|
private var tabSelectedImages: [UIImage?] = []
|
|
71
71
|
private var suppressTabSelectEvent = false
|
|
72
72
|
private var tabSelectEmittedForReTap = false
|
|
73
|
+
private var lastSetTabbarOptions: [String: Any] = [:]
|
|
73
74
|
private var transitionSnapshot: UIView?
|
|
74
75
|
private var activeTransitionId: String?
|
|
75
76
|
private var activeTransitionDirection = "forward"
|
|
@@ -234,6 +235,9 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
234
235
|
icons: icons
|
|
235
236
|
)
|
|
236
237
|
self.applySystemTabBarItems(items, selectedIndex: selectedIndex, animated: call.getBool("animated", false))
|
|
238
|
+
if let options = call.options as? [String: Any] {
|
|
239
|
+
self.lastSetTabbarOptions = options
|
|
240
|
+
}
|
|
237
241
|
self.applyTabBarAppearance(tabBar: tabBar, options: call)
|
|
238
242
|
if items.isEmpty {
|
|
239
243
|
self.tabbarVisible = false
|
|
@@ -622,17 +626,29 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
622
626
|
tabBarController?.view.layoutIfNeeded()
|
|
623
627
|
|
|
624
628
|
if let tabBar = tabBar {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
629
|
+
if usesSystemLiquidGlass,
|
|
630
|
+
!lastSetTabbarOptions.isEmpty,
|
|
631
|
+
let refreshCall = CAPPluginCall(
|
|
632
|
+
callbackId: "tabbar-refresh",
|
|
633
|
+
methodName: "setTabbar",
|
|
634
|
+
options: lastSetTabbarOptions,
|
|
635
|
+
success: { _, _ in },
|
|
636
|
+
error: { _ in }
|
|
637
|
+
) {
|
|
638
|
+
applyTabBarAppearance(tabBar: tabBar, options: refreshCall)
|
|
639
|
+
} else {
|
|
640
|
+
tabBar.isTranslucent = !prefersOpaqueTabBarBackground()
|
|
641
|
+
let standardAppearance = tabBar.standardAppearance
|
|
642
|
+
tabBar.standardAppearance = standardAppearance
|
|
634
643
|
if #available(iOS 15.0, *) {
|
|
635
|
-
|
|
644
|
+
let scrollEdgeAppearance = tabBar.scrollEdgeAppearance ?? standardAppearance
|
|
645
|
+
tabBar.scrollEdgeAppearance = scrollEdgeAppearance
|
|
646
|
+
}
|
|
647
|
+
tabBar.items?.forEach { item in
|
|
648
|
+
item.standardAppearance = standardAppearance
|
|
649
|
+
if #available(iOS 15.0, *) {
|
|
650
|
+
item.scrollEdgeAppearance = tabBar.scrollEdgeAppearance
|
|
651
|
+
}
|
|
636
652
|
}
|
|
637
653
|
}
|
|
638
654
|
tabBar.setNeedsLayout()
|
|
@@ -1480,7 +1496,9 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
1480
1496
|
private func applyTabBarAppearance(tabBar: UITabBar, options call: CAPPluginCall) {
|
|
1481
1497
|
if usesSystemLiquidGlass {
|
|
1482
1498
|
let standardAppearance = UITabBarAppearance()
|
|
1483
|
-
|
|
1499
|
+
// Match scroll-edge background so UIKit does not swap Liquid Glass for
|
|
1500
|
+
// legacy material when content scrolls under the bar (iOS 26+).
|
|
1501
|
+
configureSystemTabBarScrollEdgeBackground(standardAppearance, options: call)
|
|
1484
1502
|
applyTabBarColorOptions(standardAppearance, tabBar: tabBar, options: call)
|
|
1485
1503
|
applyTabBarBadgeOptions(standardAppearance, options: call)
|
|
1486
1504
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-native-navigation",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.2",
|
|
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",
|