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
Kevin Zoltany
16,282 PointsNeed help with table view background (Closed)
I'm building an app with a tabbed view and in this app I use a table view for the first page and I changed the background of the table but when I create a new list item in the table the background and the font color doesn't change to what I set it to.
here is a picture of the problem: http://snag.gy/RcHYx.jpg
Thank you
1 Answer
Gregory Serfaty
37,140 PointsTry to put in your method tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
[cell setBackgroundColor:[UIColor clearColor]];
Kevin Zoltany
16,282 PointsKevin Zoltany
16,282 Pointsi'm currently not using a method to set the background color i'm just using interface builder.
Kevin Zoltany
16,282 PointsKevin Zoltany
16,282 Pointsokay never mind I added to my cell creation method
cell.backgroundColor = UIColor.clearColor()and it worked. The background color of the cell is the same color as the table but then how to I change the font color?
Kevin Zoltany
16,282 PointsKevin Zoltany
16,282 Pointssorry about this but thanks for your help in the end I came up with this.