Error: UITableView jump to top with UITableViewAutomaticDimension

前端 未结 7 1700
半阙折子戏
半阙折子戏 2020-12-05 15:17

I am using UITableView with estimatedRowHeight and UITableViewAutomaticDimension. Also I am using NSFetchedResultsControllerDele

7条回答
  •  粉色の甜心
    2020-12-05 15:21

    tableView.reloadData()
    if tableView.numberOfRowsInSection(0) > 0
    {
          let indexPath = NSIndexPath(forRow: 0, inSection: 0)
          self. tableView.scrollToRowAtIndexPath(indexPath, atScrollPosition: .Top, animated: true)
    }
    

提交回复
热议问题