Skip to content

Commit 45fcf0e

Browse files
committed
Add basic TabBar styling
1 parent 0f03abf commit 45fcf0e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

RubyEvents/controllers/TabBarController.swift

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,26 @@ class TabBarController: UITabBarController {
134134
}
135135
}
136136

137+
// NavBar styling
137138
let navigationBarAppearance = UINavigationBarAppearance()
138139
navigationBarAppearance.configureWithDefaultBackground()
139-
140140
UINavigationBar.appearance().standardAppearance = navigationBarAppearance
141141
UINavigationBar.appearance().scrollEdgeAppearance = navigationBarAppearance
142142
UINavigationBar.appearance().isOpaque = false
143143
UINavigationBar.appearance().isTranslucent = true
144-
145144
navigationBarAppearance.titleTextAttributes = [.foregroundColor: UIColor.black]
146145

146+
// TabBar styling
147+
let tabBarAppearance = UITabBarAppearance()
148+
tabBarAppearance.configureWithDefaultBackground()
149+
tabBarAppearance.backgroundColor = UIColor.white
150+
UITabBar.appearance().standardAppearance = tabBarAppearance
151+
UITabBar.appearance().scrollEdgeAppearance = tabBarAppearance
152+
UITabBar.appearance().isOpaque = true
153+
UITabBar.appearance().isTranslucent = false
154+
UITabBar.appearance().tintColor = .red
155+
UITabBar.appearance().unselectedItemTintColor = .black
156+
147157
self.isSetup = true
148158
}
149159

0 commit comments

Comments
 (0)