Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Implementing Designs for iPhone Customizing Table View Controllers Styling the Navigation Bar

Alejandro Machado
Alejandro Machado
16,091 Points

Not accepting a right answer?

For part 3 of the challenge, I am adding the following line of code to the method:

[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];

I just tested this code on Xcode and it does indeed change the text color of the bar buttons to white, which was what was intended in the challenge.

Am I missing something? :)

Thanks!

3 Answers

Guillaume Maka
PLUS
Guillaume Maka
Courses Plus Student 10,224 Points

You need to use

// works on xcode
[UIBarButtonItem appearance].tintColor = [UIColor whiteColor]; 

// for treehouse 
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];

My mistake most of the time we customize bar button via UINavigationBar appearance proxy

Wait, Alejandro Machado and Guillaume Maka - please see my thread here

Alejandro Machado
Alejandro Machado
16,091 Points

That throws a compiler error. Interesting, I think that line does the same as what I posted.

Alejandro Machado
Alejandro Machado
16,091 Points

I mean it throws a compiler error in Treehouse's challenge website, on Xcode it works just fine.

Guillaume Maka
Guillaume Maka
Courses Plus Student 10,224 Points

Well I tried it on treehouse and like you it throw a compiler error,

Alejandro Machado
Alejandro Machado
16,091 Points

Great, this works. Thanks! I think Treehouse should accept the other answer too, though.