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 Tab Bar

Michael Hulet
Michael Hulet
47,843 Points

Deprecation Warning

@Ben Jakuben: There's a little deprecation warning at around 5:40 in the attached video. It comes when we call the method setFinishedSelectedImage:withFinishedUnselectedImage:. This method was deprecated in iOS 7.0. Unfortunately, the new way of doing it involves separating this out into 2 lines.

The old code (for one UITabBarItem) is this:

[tabInbox setFinishedSelectedImage:@"inbox" withFinishedUnselectedImage:@"inbox"];

However, the new, non-deprecated code to do the same thing looks like this:

tabInbox.image = [[UIImage imageNamed:@"inbox"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
tabInbox.selectedImage = [[UIImage imageNamed:@"inbox"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

Unfortunately, as you can see, you now must split setting the image and selectedImage properties into 2 separate lines, and with each assignment, you must specify the UIImageRenderingMode for each image

1 Answer

Anthony Martinez
Anthony Martinez
13,111 Points

Great post. This deprecation warning should be included in the teachers notes of the lecture - Xcode pops up an alert bubble to let users know - students should get a heads up to avoid confusion :)