Connect contentSize to constraint using intrinsicContentSize.

class InnerTableView: UITableView {

    override var intrinsicContentSize: CGSize {
        return contentSize
    }

    override var contentSize: CGSize {
        didSet {
            invalidateIntrinsicContentSize()
        }
    }

}