BasThomas / Issues

Source code of an (upcoming) iOS app
MIT License
0 stars 0 forks source link

UITableViewAutomaticDimension can use smaller values than the estimated height #63

Open BasThomas opened 9 years ago

BasThomas commented 9 years ago

UITableViewAutomaticDimension can use values below the estimated height. I want it to always lower bound (on 44), but that's not possible.

I tried the following:

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

But as UITableViewAutomaticDimension calculates after that's called, it always returns -1, so larger cells also get a height of 44.