How does one set the UITableView Section border color? I have tried and cant seem to change it. its default is white, I want to set it to a gray color.
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.
The white color is because the separator style is set to Single Line Edged. If you change it to Single Line the white lines will disappear. Not sure if that solves your problem but I don’t think you change the color without doing a lot more work.
I believe what Apple uses for its contact heading is
tableView:viewForHeaderInSection:for section0, instead of a cell in the first section. You can still specify a transparent background and the pinstripe will show behind it. The border will not be there as grouped table view section headers do not have borders.Whether you built your custom cell in Interface Builder or using code, it should be a fairly trivial task to migrate those views from a
UITableViewCellto aUIViewfor use withtableView:viewForHeaderInSection:.I don’t know if you’ll be able to keep the Details title for, say, section
1, unless you make a label containing that word and add it to the section0header view manually.Finally if all the above advise didnt help then check this link out.