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 Enhance a Weather App with Table Views Implementing the Detail View Customizing the Detail Nav Bar

dexter foo
dexter foo
8,233 Points

BackgroundView

May i ask what is the difference between making the view on the detailView a class of DetailBackgroundView in the identity inspector and using the configureView method to assign the backgroundView to the detailView. I asked this because pasan used the configureView method to change the backgroundView of the tableView but he assigned the class DetailBackgroundView to the detailView in the identity inspector when he wanted to change the backgroundView of the detailView

KB Li
KB Li
Courses Plus Student 625 Points

Hi dexter,

Good question! To me, they both achieve the same effect: to change the background color. But changing the color in code makes it easy for other people to understand what we have done. What is more, for the DetailViewController, we should use self.view = DetailBackgroundView() instead of tableView.backgroundView = DetailBackgroundView(), since we do not have a table view in this controller.