Fix hiding tab bar titles for iPad

pull/136/head
Hwee-Boon Yar 7 years ago
parent f015506aca
commit a81308afe1
  1. 7
      Trust/InCoordinator.swift
  2. 2
      Trust/Settings/ViewControllers/SettingsViewController.swift

@ -185,9 +185,10 @@ class InCoordinator: Coordinator {
private func hideTitlesInTabBarController(tabBarController: UITabBarController) {
guard let items = tabBarController.tabBar.items else { return }
for each in items {
each.imageInsets = UIEdgeInsets(top: 6, left: 0, bottom: -6, right: 0)
each.setTitleTextAttributes([.foregroundColor: UIColor.clear], for: .selected)
each.setTitleTextAttributes([.foregroundColor: UIColor.clear], for: .normal)
if UIDevice.current.userInterfaceIdiom == .phone {
each.imageInsets = UIEdgeInsets(top: 6, left: 0, bottom: -6, right: 0)
}
each.title = ""
}
}

@ -31,11 +31,11 @@ class SettingsViewController: FormViewController {
init(session: WalletSession) {
self.session = session
super.init(style: .plain)
title = R.string.localizable.aSettingsNavigationTitle()
}
override func viewDidLoad() {
super.viewDidLoad()
title = R.string.localizable.aSettingsNavigationTitle()
let account = session.account
view.backgroundColor = Colors.appBackground

Loading…
Cancel
Save