Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Horizon] Tab bar icons #3037

Open
wants to merge 1 commit into
base: feature/horizon
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Horizon/Horizon/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
},
"Are you sure you want to proceed?" : {

},
"Career" : {

},
"Check Answer" : {

Expand Down Expand Up @@ -133,6 +130,9 @@
},
"Search" : {

},
"Skillspace" : {

},
"Submit Assignment" : {

Expand Down
16 changes: 12 additions & 4 deletions Horizon/Horizon/Sources/Features/HorizonTabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import Core
import HorizonUI
import UIKit
import SwiftUI

final class HorizonTabBarController: UITabBarController, UITabBarControllerDelegate {
// MARK: - Properties
Expand Down Expand Up @@ -73,7 +74,8 @@ final class HorizonTabBarController: UITabBarController, UITabBarControllerDeleg
vc.navigationBar.scrollEdgeAppearance = appearance

vc.tabBarItem.title = String(localized: "Home", bundle: .horizon)
vc.tabBarItem.image = UIImage(systemName: "house")
vc.tabBarItem.image = getHorizonImage(name: "home")
vc.tabBarItem.selectedImage = getHorizonImage(name: "home_filled")
return vc
}

Expand All @@ -82,7 +84,8 @@ final class HorizonTabBarController: UITabBarController, UITabBarControllerDeleg
rootViewController: CoreHostingController(LearnAssembly.makeCoursesView())
)
vc.tabBarItem.title = String(localized: "Learn", bundle: .horizon)
vc.tabBarItem.image = UIImage(systemName: "list.bullet")
vc.tabBarItem.image = getHorizonImage(name: "book_2")
vc.tabBarItem.selectedImage = getHorizonImage(name: "book_2_filled")
return vc
}

Expand All @@ -95,8 +98,9 @@ final class HorizonTabBarController: UITabBarController, UITabBarControllerDeleg
rootViewController: CoreHostingController(Storybook())
)
vc.navigationBar.prefersLargeTitles = true
vc.tabBarItem.title = String(localized: "Career", bundle: .horizon)
vc.tabBarItem.image = UIImage(systemName: "point.bottomleft.filled.forward.to.point.topright.scurvepath")
vc.tabBarItem.title = String(localized: "Skillspace", bundle: .horizon)
vc.tabBarItem.image = getHorizonImage(name: "hub")
vc.tabBarItem.selectedImage = getHorizonImage(name: "hub_filled")
return vc
}

Expand All @@ -117,6 +121,10 @@ final class HorizonTabBarController: UITabBarController, UITabBarControllerDeleg
TabBarBadgeCounts.messageItem = inboxSplit.tabBarItem
return inboxSplit
}

private func getHorizonImage(name: String) -> UIImage? {
UIImage(named: name, in: Bundle.horizonUI, with: nil)
}
}

extension HorizonTabBarController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,3 +429,7 @@ public extension HorizonUI {
extension Image {
static let huiIcons = HorizonUI.icons
}

public extension Bundle {
static let horizonUI = Bundle.module
}