Is there a way to disable the transparency in TabView
for iOS 15? If my List
doesn't fill the entire screen the TabView
background is transparent, I'm looking to always show the TabView
background.
Asked
Active
Viewed 3,251 times
8

cole
- 1,039
- 1
- 8
- 35
-
3Modify appearance of UITabBar as you like (translucency, background color, etc). This should be helpful https://stackoverflow.com/a/63414605/12299030. – Asperi Sep 23 '21 at 06:59
1 Answers
7
Thanks to @Asperi for pointing me in the correct direction. I found scrollEdgeAppearance
in UITabBarAppearance
.
@available(iOS 15.0, *)
@NSCopying open var scrollEdgeAppearance: UITabBarAppearance?
Describes the appearance attributes for the tabBar to use when an observable scroll view is scrolled to the bottom. If not set, standardAppearance will be used instead.
//@available(iOS 15.0, *)
//@NSCopying open var scrollEdgeAppearance: UITabBarAppearance?
let appearance: UITabBarAppearance = UITabBarAppearance()
init() {
UITabBar.appearance().scrollEdgeAppearance = appearance
}

cole
- 1,039
- 1
- 8
- 35