答案 0 :(得分:0)
想通了...添加到您的tabBarController类中:
UINavigationControllerDelegate
然后设置:
moreNavigationController.delegate = self
然后添加此内容:
func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
if (self.moreNavigationController.topViewController?.title == "More"){
let moreTableView = self.moreNavigationController.topViewController!.view as! UITableView
for cell in moreTableView.visibleCells {
for views in cell.subviews {
// print(views.description.contains("_UITableViewCellBadgeNeue"))
for items in views.subviews {
if (items is UILabel) {
let item = items as! UILabel
item.textColor = UIColor.white
item.backgroundColor = UIColor(red: 27, green: 27, blue: 27, transparancy: 100)
}
}
}
}
}
}