@@ -125,15 +125,16 @@ struct TabViewImpl: View {
125
125
}
126
126
. tag ( tabData? . key)
127
127
. tabBadge ( tabData? . badge)
128
- #if os(iOS)
129
128
. onAppear {
130
129
updateTabBarAppearance ( props: props, tabBar: tabBar)
130
+
131
+ #if os(iOS)
131
132
guard index >= 4 ,
132
133
let key = tabData? . key,
133
134
props. selectedPage != key else { return }
134
135
onSelect ( key)
135
- }
136
136
#endif
137
+ }
137
138
}
138
139
}
139
140
@@ -211,14 +212,20 @@ private func createFontAttributes(
211
212
return attributes
212
213
}
213
214
215
+ #if os(tvOS)
216
+ let tabBarDefaultFontSize : CGFloat = 30.0
217
+ #else
218
+ let tabBarDefaultFontSize : CGFloat = UIFont . smallSystemFontSize
219
+ #endif
220
+
214
221
private func configureTransparentAppearance( tabBar: UITabBar , props: TabViewProps ) {
215
222
tabBar. barTintColor = props. barTintColor
216
223
tabBar. isTranslucent = props. translucent
217
224
tabBar. unselectedItemTintColor = props. inactiveTintColor
218
225
219
226
guard let items = tabBar. items else { return }
220
227
221
- let fontSize = props. fontSize != nil ? CGFloat ( props. fontSize!) : UIFont . smallSystemFontSize
228
+ let fontSize = props. fontSize != nil ? CGFloat ( props. fontSize!) : tabBarDefaultFontSize
222
229
let attributes = createFontAttributes (
223
230
size: fontSize,
224
231
family: props. fontFamily,
@@ -245,7 +252,7 @@ private func configureStandardAppearance(tabBar: UITabBar, props: TabViewProps)
245
252
246
253
// Configure item appearance
247
254
let itemAppearance = UITabBarItemAppearance ( )
248
- let fontSize = props. fontSize != nil ? CGFloat ( props. fontSize!) : UIFont . smallSystemFontSize
255
+ let fontSize = props. fontSize != nil ? CGFloat ( props. fontSize!) : tabBarDefaultFontSize
249
256
250
257
let attributes = createFontAttributes (
251
258
size: fontSize,
0 commit comments