Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the color of moreNavigationController's icons

I've managed to change the navBar tint, the background color and labels' color using this.

But is it possible to change the icons' color?

(those left to tableview's labels)

Thanks!

My half-done work

like image 700
Abramodj Avatar asked May 10 '11 17:05

Abramodj


2 Answers

I don't know of a way to change the icon colors, but I don't really think all this hacking is necessary anyway - Apple certainly doesn't recommend it.

As far as I can tell, there is nothing special about the moreViewController, apart from being hard to customize. If it were me, I'd simply create my own custom viewcontroller, say MoreViewController, as a subclass of UITableViewController, add it to a NavigationController and then add that as the fifth and last item in the TabBarController. This table would then have a cell for each additional viewcontroller that I'd like to show. Then I'd be free to customize these cells to my heart's content.

like image 71
Martin Gjaldbaek Avatar answered Sep 21 '22 20:09

Martin Gjaldbaek


This is an old question, nevertheless I'll post a fairly reasonable solution I found.

I first tried setting the global tint color to what I wanted, but that didn't work. Luckily, simply changing the tint color of the table view did work. Adapting code from here:

let color: UIColor
// ...
if let moreTableView = moreNavigationController.topViewController?.view as? UITableView {
    moreTableView.tintColor = color
}

This still doesn't seem to affect the edit view controller, however.

EDIT: There is actually a simpler way to do both, see this answer.

like image 24
shawkinaw Avatar answered Sep 19 '22 20:09

shawkinaw