Breaking constraints with self.tableView.separatorStyle = .None
kafejo opened this issue · comments
Aleš Kocur commented
You calculate cell height with the separator so if there isn't one, it breaks the constraints.
func calculateHeightForConfiguredSizingCell(cell: MYTableViewCell) -> CGFloat {
cell.bounds = CGRectMake(0, 0, tableView?.bounds.width ?? UIScreen.mainScreen().bounds.width, cell.bounds.height)
cell.setNeedsLayout()
cell.layoutIfNeeded()
let size = cell.contentView.systemLayoutSizeFittingSize(UILayoutFittingCompressedSize)
return size.height + 1.0
}
Aleš Kocur commented
I have created pull request for that #15