Skip to content

Commit

Permalink
feat/#114 탭바 색상 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
youz2me committed Jul 5, 2024
1 parent 12bed83 commit 1cba8b0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
25 changes: 7 additions & 18 deletions KkuMulKum/Source/Core/MainTabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,23 @@ import UIKit


final class MainTabBarController: UITabBarController {


// MARK: - Properties

private let homeViewController: HomeViewController = HomeViewController().then {
$0.tabBarItem.title = ""
$0.tabBarItem.image =
$0.tabBarItem.selectedImage =
$0.tabBarItem.image = .iconHome
}

private let groupViewController: GroupViewController = GroupViewController().then {
$0.tabBarItem.title = "내 모임"
$0.tabBarItem.image =
$0.tabBarItem.image = .iconGroup
}

private let myViewController: MyViewController = MyViewController().then {
$0.tabBarItem.title = "마이"
$0.tabBarItem.image =
}

private let logoImageBarButtonItem: UIBarButtonItem = UIBarButtonItem().then {
$0.image =
$0.tabBarItem.image = .iconMy
}


Expand All @@ -37,23 +34,15 @@ final class MainTabBarController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()

setNavigationBar()
setTabBar()
}


// MARK: - Functions

private func setNavigationBar() {
[
homeViewController, groupViewController, myViewController
].forEach {
$0.navigationItem.setLeftBarButton(logoImageBarButtonItem, animated: true)
}
}

private func setTabBar() {
self.tabBar.tintColor = .black
tabBar.unselectedItemTintColor = .gray2
tabBar.tintColor = .maincolor

setViewControllers([
UINavigationController(rootViewController: homeViewController),
Expand Down
2 changes: 1 addition & 1 deletion KkuMulKum/Source/Group/GroupViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class GroupViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()

// Do any additional setup after loading the view.
view.backgroundColor = .white
}


Expand Down
2 changes: 1 addition & 1 deletion KkuMulKum/Source/Home/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class HomeViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()

// Do any additional setup after loading the view.
view.backgroundColor = .white
}


Expand Down
2 changes: 1 addition & 1 deletion KkuMulKum/Source/My/MyViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class MyViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()

// Do any additional setup after loading the view.
view.backgroundColor = .white
}


Expand Down

0 comments on commit 1cba8b0

Please sign in to comment.