Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Dennis Dixon
Dennis Dixon
6,107 Points

Quiz not Accepting the Line of Code in Lesson

Resubmitted as advised by Customer Support:

Team Treehouse Team,

The “Styling the Navigation Bar” quiz in the “Implementing Designs for iPhone” section of the “iOS Development” Track is not accepting the line of code in the lesson: [[UINavigationBar appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],UITextAttributeTextColor,nil]];

The Apple docs said that UITextAttributeTextColor is deprecated in iOS 7, so I replaced that constant with 'NSForegroundColorAttributeName' and it still didn't pass the Treehouse quiz compiler.

Both compiled for me in Xcode 5.1 only giving me a warning in the first version of the line.

This is preventing me from completing the section and the track so your assistance as soon as possible will be greatly appreciated. Thanks and have a great day.

Regards, Dennis

Dennis Dixon
Dennis Dixon
6,107 Points

I reposted this question as advised by Customer Support.

2 Answers

Dennis Dixon
Dennis Dixon
6,107 Points

My mistake. I found my error. I thought that setting the title text attributes set the nav bar text color. Setting the tintColor property of the UINavigationBar did it...but what do I do now that I've confirmed that I'm a bonehead? :)

Benjamin Harrison
Benjamin Harrison
4,784 Points

Even though that's true, the error that it gives is "syntax error" which is incorrect and misleading.