[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: <UITableView: 0x7fe2ba8d5a00; frame = (-47 -80; 394 553); clipsToBounds = YES; autoresize = RM+BM; gestureRecognizers = <NSArray: 0x600003447480>; layer = <CALayer: 0x600003aa2be0>; contentOffset: {0, 0}; contentSize: {394, 176}; adjustedContentInset: {0, 0, 0, 0}; dataSource: <Project.MondayToSundayViewController: 0x7fe2b9da05c0>>

我的錯(cuò)誤場景:

tableview界面 push到二級(jí)界面pop回來后再viewWillAppear中使用 self.tableView.reloadRows(at: [IndexPath], with: UITableView.RowAnimation)
刷新了cell
根據(jù)多次測試,直接使用reloadData就沒問題,具體原因未明待查

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • afinalAfinal是一個(gè)android的ioc,orm框架 https://github.com/yangf...
    passiontim閱讀 15,877評(píng)論 2 45
  • afinalAfinal是一個(gè)android的ioc,orm框架 https://github.com/yangf...
    wgl0419閱讀 6,595評(píng)論 1 9
  • Xcode 9 Release Notes See more downloads 關(guān)于Xcode Accessin...
    印林泉閱讀 4,727評(píng)論 7 3
  • General New Features Xcode 11 beta supports development w...
    Zszen閱讀 3,593評(píng)論 0 50
  • 久違的晴天,家長會(huì)。 家長大會(huì)開好到教室時(shí),離放學(xué)已經(jīng)沒多少時(shí)間了。班主任說已經(jīng)安排了三個(gè)家長分享經(jīng)驗(yàn)。 放學(xué)鈴聲...
    飄雪兒5閱讀 7,822評(píng)論 16 22

友情鏈接更多精彩內(nèi)容