Since updating to iOS 9, table view cell\'s in iPad landscape no longer stretch the full width of the table in my unit tests.
My test is a simple table that takes a snap
hope this help you
// MARK: - TableView Delegates And Datasource Method -
func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {
// IOS 7
if(self.respondsToSelector(Selector("setSeparatorInset:"))){
self.separatorInset = UIEdgeInsetsZero
cell.separatorInset = UIEdgeInsetsZero
tableView.separatorInset = UIEdgeInsetsZero;
}
// OTHER
if(self.respondsToSelector(Selector("setPreservesSuperviewLayoutMargins:"))){
if #available(iOS 8.0, *) {
self.separatorInset = UIEdgeInsetsZero
cell.layoutMargins = UIEdgeInsetsZero;
cell.preservesSuperviewLayoutMargins = false
}
}
// iOS 8
if(self.respondsToSelector(Selector("setLayoutMargins:"))){
if #available(iOS 8.0, *) {
self.separatorInset = UIEdgeInsetsZero
cell.layoutMargins = UIEdgeInsetsZero
}
}
// iOS 9
if (self.respondsToSelector("setCellLayoutMarginsFollowReadableWidth:")){
if #available(iOS 9.0, *) {
self.cellLayoutMarginsFollowReadableWidth = false
}
}
}