我有这段代码来定制我的moreNavigationController:
UITableView *tView = (UITableView*)tabController.moreNavigationController.topViewController.view;
if ([[tView subviews] count]) {
for (UITableViewCell *cCell in [tView visibleCells]) {
cCell.textLabel.textColor = TABLECELL_TEXT_COLOR;
cCell.textLabel.highlightedTextColor = TABLECELL_TEXT_COLOR_HIGHLIGHTED;
cCell.contentView.backgroundColor = TABLECELL_BACKGROUND_COLOR;
cCell.backgroundColor = TABLECELL_BACKGROUND_COLOR;
UIView * selectedBackgroundView = [[UIView alloc] init];
UIColor *uicCell = TABLECELL_BACKGROUND_COLOR_SELECTED
[selectedBackgroundView setBackgroundColor:uicCell];
[cCell setSelectedBackgroundView:selectedBackgroundView];
}
}
我将我的TabBar图像更改为灰色和绿色,但当我点击“更多”按钮时,结果是这样的:
![enter image description here](https://istack.dev59.com/EDeCL.webp)
我已将以下代码添加到我的函数中:
UIImageView *imgV = cCell.imageView;
imgV.tintColor = [UIColor redColor];
[imgV setTintColor:[UIColor redColor]];
UIImageView *imgV2 = imgV;
以下是您需要翻译的结果:
我能在变量中看到这些内容:
非常感谢任何帮助。
viewDidLayoutSubviews
中。 - techloverr