Iphone 在MoreNavigationController中更改文本颜色

Iphone 在MoreNavigationController中更改文本颜色,iphone,uitableview,uitabbarcontroller,textcolor,Iphone,Uitableview,Uitabbarcontroller,Textcolor,我希望我现在没有重复任何线索,但我找不到我的问题的好答案。 我有五个以上的标签,所以会自动出现更多的标签。我已经设法更改了它的一些设置,例如导航栏的标题、背景和样式等等。我的问题是,我不知道如何在“更多表格”视图中更改文本颜色。应用程序的其余部分在所有表视图中都有黑色背景,带有白色文本 代码行:tabBarController.moreNavigationController.topViewController.view.backgroundColor=[UIColor blackColor]

我希望我现在没有重复任何线索,但我找不到我的问题的好答案。 我有五个以上的标签,所以会自动出现更多的标签。我已经设法更改了它的一些设置,例如导航栏的标题、背景和样式等等。我的问题是,我不知道如何在“更多表格”视图中更改文本颜色。应用程序的其余部分在所有表视图中都有黑色背景,带有白色文本

代码行:
tabBarController.moreNavigationController.topViewController.view.backgroundColor=[UIColor blackColor]

我有一个黑色的背景。有没有关于如何更改文本颜色的想法?

试试以下方法:

UITableView *view = (UITableView*)self.tabBarController.moreNavigationController.topViewController.view;
    if ([[view subviews] count]) {
        for (UITableViewCell *cell in [view visibleCells]) {
            cell.textLabel.textColor = [UIColor redColor];
        }
    } 

Swift 4版本:

if let tableView = moreNavigationController.topViewController?.view as? UITableView {
    for cell in tableView.visibleCells {
        cell.textLabel?.textColor = .red
    }
}
我删除了外部if([[view subviews]count]),它工作得很好,谢谢。