简体   繁体   中英

iOS - Cell Separators Don't Appear on UITableView

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

http://i.imgur.com/qFja6nm.png

Here are the warnings I have:

http://i.imgur.com/iubdGYZ.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:

http://i.imgur.com/7Oku66X.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:

http://i.imgur.com/slt48tU.png

http://i.imgur.com/NCIJfS1.png

http://i.imgur.com/EXyWvTt.png

iOS 11 simulators: + 2 ( Pixel Accurate option)


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


Physical device: always work just fine.


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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM