9

The cell separators on my table view do not appear in the iOS simulator. Here is the ViewController:

https://i.sstatic.net/6Y2tM.png

Here are the warnings I have:

https://i.sstatic.net/b64B2.png

The custom segue is the one that I have when the user clicks on a cell in the table. I use a search display controller in the code for searching with the search bar, and displaying in the table view.

Here is what the iOS simulator shows:

https://i.sstatic.net/8HHzB.png

The cell separators do appear when I click and drag the table, but not when it is not being interacted with.

I also include these lines in the code in an attempt to fix the problem:

tableView.separatorStyle = UITableViewCellSeparatorStyle.SingleLine
self.automaticallyAdjustsScrollViewInsets = false

EDIT:

Here are the settings for the tableView:

https://i.sstatic.net/8RJNG.png

https://i.sstatic.net/XWNZr.png

https://i.sstatic.net/E5hcW.png

6
  • Will you post a picture of the settings for the tableview that you have in your storyboard?
    – Jeff Lewis
    Commented Jul 12, 2015 at 5:20
  • When are you setting the separator style? Commented Jul 12, 2015 at 5:21
  • @rikkigibson At the end of the viewDidLoad method. Commented Jul 12, 2015 at 6:22
  • You are already setting your separator style in your storyboard, so there is no need to set it in your code in this case. You might try un-checking "Clip Subviews" in your settings. Sometimes that works for me.
    – Jeff Lewis
    Commented Jul 12, 2015 at 6:32
  • @JeffLewis That didn't work :( Thanks for the suggestion though. Commented Jul 12, 2015 at 6:40

1 Answer 1

45

iOS 11 simulators: +2 (Pixel Accurate option)


iOS 10 and below simulators: +1 (100% scale option)


Physical device: "it just works"


Also, you can show the separators by interacting with the UITableView (unless scrolling/bouncing is turned off).

2
  • 3
    I see this behavior with the iOS 9.1 simulator (iPhone 5s at least). But never on a real device.
    – drshock
    Commented Oct 31, 2015 at 2:10
  • 1
    I can see it in 100% scale.
    – girish_pro
    Commented Dec 15, 2015 at 6:49

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.