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 trialDustin James
11,364 Points"First deprecated in iOS 7.0"
[tabCamera setFinishedSelectedImage:[UIImage imageNamed:@"camera"] withFinishedUnselectedImage:[UIImage imageNamed:@"camera"]];
This and the other two similar lines gives a warning: "...deprecated... use initWithTitle:image:selectedImage: or the image and selectedImage properties along with UIImageRenderingModeAlwaysOriginal."
Trying to implement this like this:
UIImage * inbox = [UIImage imageNamed:@"inbox"];
inbox = [inbox imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
[tabInbox initWithTitle:@"Inbox" image:inbox selectedImage:inbox];
I still get a warning: "Expression result unused"
I found this on Stackoverflow
Any thoughts?
Also, when I change the TabBarViewController (the rootController) tint color to white - it does nothing.
3 Answers
Enara L. Otaegi
13,107 PointsYou have to assign the last method to tabInbox like this(or at least this worked for me):
tabInbox = [tabInbox initWithTitle:@"Inbox" image:inbox selectedImage:inbox];
Dustin James
11,364 PointsThat was so obvious, I am embarrassed.
Thank you, Dustin James
Enara L. Otaegi
13,107 PointsDon't be embarrased, we're learning. Happy to help!
Andrew Kelly
4,738 PointsAlso wanted to say Thanks Enara. I was also struggling and your solution helped me out as well!
Thanks!