6

I have noticed a change in the look of the tableview cells in iOS 5, and I googles around a bit to see if anyone else had noticed. This fellow did, and posted this image. I can't reproduce it on every uitableview (if I could I would know where it came from and I could get rid of it), but it is certainly causing me a problem on one of my tableviews. Has anyone else noticed this - better yet, has anyone else found a way to get rid of it?

3
  • I think it's intentional - notice how it makes the table look slightly recessed? Commented Oct 16, 2011 at 18:44
  • Yeah.. but when you are doing custom tableview cells sometimes it doesn't make your cells look nicer, but worse. That's the problem I'm having. I just wonder if there is a way to get rid of it. Commented Oct 16, 2011 at 19:56
  • Does anyone know how to get rid of this? Commented Oct 17, 2011 at 5:58

2 Answers 2

19

I had this issue, on an iOS4 phone or simulator it looks fine but for iOS5 it was a problem. I discovered that the issue was with the separator style for the table view. It looks like the default value is set to etched for iOS5. I have gone through my code and added the following line to my init method for all grouped table view controllers:

    self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;

Which has fixed the issue for me, although I also set the following as the color appeared to be white not grey as in the previous version:

    self.tableView.separatorColor = [UIColor lightGrayColor];

It was a problem for me as I have changed the background on all of my table views and the extra line didn't look good for my app.

Sign up to request clarification or add additional context in comments.

Comments

2

use:

self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.