UITableView Content Size Smaller than Expected

Viewed 1459

I have a UIScrollView with a UITableView inside. I have disabled scrolling on the table view. I am using the following code to keep the UITableView's height to the height of it's content.

override func updateViewConstraints() {
        self.editView!.editTblHeightCnst.constant = self.editView!.editTbl.contentSize.height + self.editView!.editTbl.contentInset.top + self.editView!.editTbl.contentInset.bottom + self.editView!.editTbl.contentOffset.y
        super.updateViewConstraints()
    }

However, the content size I'm getting there is too small. If I add a couple hundered or less to the content size, it works. Why is my content size not what I'm expecting and how do I fix this?

1 Answers
Related