@@ -22,6 +22,7 @@ class TabViewProps: ObservableObject {
22
22
@Published var ignoresTopSafeArea : Bool = true
23
23
@Published var disablePageAnimations : Bool = false
24
24
@Published var hapticFeedbackEnabled : Bool = false
25
+ @Published var borderColor : UIColor ?
25
26
@Published var fontSize : Int ?
26
27
@Published var fontFamily : String ?
27
28
@Published var fontWeight : String ?
@@ -241,6 +242,11 @@ private func configureTransparentAppearance(tabBar: UITabBar, props: TabViewProp
241
242
items. forEach { item in
242
243
item. setTitleTextAttributes ( attributes, for: . normal)
243
244
}
245
+
246
+ if let borderColor = props. borderColor {
247
+ tabBar. layer. borderWidth = 0.5
248
+ tabBar. layer. borderColor = borderColor. cgColor
249
+ }
244
250
}
245
251
246
252
private func configureStandardAppearance( tabBar: UITabBar , props: TabViewProps ) {
@@ -281,6 +287,10 @@ private func configureStandardAppearance(tabBar: UITabBar, props: TabViewProps)
281
287
appearance. inlineLayoutAppearance = itemAppearance
282
288
appearance. compactInlineLayoutAppearance = itemAppearance
283
289
290
+ if let borderColor = props. borderColor {
291
+ appearance. shadowColor = borderColor
292
+ }
293
+
284
294
// Apply final appearance
285
295
tabBar. standardAppearance = appearance
286
296
if #available( iOS 15 . 0 , * ) {
@@ -364,6 +374,9 @@ extension View {
364
374
. onChange ( of: props. fontWeight) { newValue in
365
375
updateTabBarAppearance ( props: props, tabBar: tabBar)
366
376
}
377
+ . onChange ( of: props. borderColor) { newValue in
378
+ updateTabBarAppearance ( props: props, tabBar: tabBar)
379
+ }
367
380
}
368
381
369
382
@ViewBuilder
0 commit comments