[TableView] Warning once only: UITableView was told to layout its visible cells and other content...

[TableView] Warning once only: UITableView was told to layout its visible cells and other contents without being in the view hierarchy (the table view or one of its superviews has not been added to a window). This may cause bugs by forcing views inside the table view to load and perform layout without accurate information (e.g. table view bounds, trait collection, layout margins, safe area insets, etc), and will also cause unnecessary performance overhead due to extra layout passes. Make a symbolic breakpoint at UITableViewAlertForLayoutOutsideViewHierarchy to catch this in the debugger and see what caused this to occur, so you can avoid this action altogether if possible, or defer it until the table view has been added to a window. Table view: ; layer = ; contentOffset: {0, 0}; contentSize: {394, 176}; adjustedContentInset: {0, 0, 0, 0}; dataSource: >

我的错误场景:

tableview界面 push到二级界面pop回来后再viewWillAppear中使用 self.tableView.reloadRows(at: [IndexPath], with: UITableView.RowAnimation)
刷新了cell
根据多次测试,直接使用reloadData就没问题,具体原因未明待查

你可能感兴趣的:([TableView] Warning once only: UITableView was told to layout its visible cells and other content...)