He creado un controlador Tab bar
y cuando agrego más de 6 items se auto genera un pestaña llamada 'MORE' en el cual se listan los demás items que se agreguen.
El problema que tengo es que cuando en el appdelegate.swift
cambio el color de todos los tableview
a un fondo color negro, el texto de los items de la pestaña 'MORE' se oculta porque son color negro, y no he encontrado la forma de modificar el color del texto de los item, lo único que he podido hacer es cambiar el color de los iconos de tableview
.
La funcion que ejecuto en el appdelegae.swift para cambiar la aparaciencia de los oebjetos es la siguiente:
func DarkMode() {
let preferencesDefault = UserDefaults.standard
if preferencesDefault.string(forKey: "modo") == "dark" {
UINavigationBar.appearance().barTintColor = .black
UINavigationBar.appearance().titleTextAttributes = [NSAttributedString.Key.foregroundColor : UIColor.white]
UITableView.appearance().backgroundColor = .black
UITableView.appearance().separatorColor = .white
UITableViewCell.appearance().backgroundColor = .black
UINavigationBar.appearance().backgroundColor = .black
// Intento fallido de cambiar el color del texto de los items UITabBarItem.appearance().setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.black], for: .normal); UITabBarItem.appearance().setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.white], for: .selected)
//UINavigationBar.appearance().tintColor = .white
} else {
UINavigationBar.appearance().barTintColor = .white
UINavigationBar.appearance().titleTextAttributes = [NSAttributedString.Key.foregroundColor : UIColor.darkText]
UITableView.appearance().backgroundColor = .white
UITableView.appearance().separatorColor = .black
UITableViewCell.appearance().backgroundColor = .white
UINavigationBar.appearance().backgroundColor = .white