1
正如在標題中所述,我試圖自定義moreNavigationController中的單元格。我讀過一些SO帖子,提出了類似的問題,但大多數已經過時,似乎是黑客。自定義UITabBarController.moreNavigationController UITableViewCells
我認爲這是一個非常普遍的情況,所以必須有一個'整齊'的方式來做到這一點?
我查看了最重要的一個tableviews委託方法,但我無法弄清楚,假設它甚至是可能的。我也試過如下:
override func viewDidLoad() {
super.viewDidLoad()
let moreNavController = self.moreNavigationController
if let moreTableView = moreNavController.topViewController?.view as? UITableView {
for cell in moreTableView.visibleCells {
cell.textLabel?.textColor = AppDarkColor
cell.imageView?.image = cell.imageView?.image?.imageWithRenderingMode(.AlwaysTemplate)
}
}
}
但moreTableView.visibleCells是空的,至少當UITabBarController
被加載。也許我需要把它移到其他地方,但我不確定這是否是正確的方法。
這就是我所做的,但忘了回到這裏!無論如何感謝您的答案! – doovers