Height assigned to table cell defaults on selection in tvos

277 Views Asked by At

I have a table view in my tvOS app with a custom row height of 250px (which doesn't amount to much). The content of each cell is a text view which has (again) a constant height of 200px. When the table loads, the dimensions look fine on initial render.

On render

But when i actual focus on the cell, it defaults to some initial height:

On selection

I've tried to give the table view an estimatedRowHeight on load:

tableView.estimatedRowHeight = 250
tableView.rowHeight = UITableViewAutomaticDimension

Even implementing the row height methods in the UITableViewDelegate doesn't help:

func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
    return UITableViewAutomaticDimension
}

func tableView(tableView: UITableView, estimatedHeightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
    return UITableViewAutomaticDimension
}

I think i'm missing something really simple, but i can't think of anything. Thanks in advance.

0

There are 0 best solutions below