I changed tableview cell color. But when I move to up or down side of tableview, it is still white. How can I change that empty space color programmatically?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want a different color of table and cell, just say
tableView.backgroundColor = desiredColor. TheUIColorclass offers class methods like+blueColor,+redColor, and such.If you want the same color of the table and its cells, keep the code above and add this in
tableView:cellForRowAtIndexPath:This is a better solution than simply saying
cell.backgroundColor = desiredColorbecause if you decide to use a view (such as a pattern), instead of just a color, as the background of your table, the background will be visible at all times, not just when you bounce the content.