Check UITableViewCell currently exists before tableview reloadRows刷新Cell前檢查Cell當下元件是否已生成
(UITableViewCell, cell exists)
有的時候可能需要單獨刷新畫面
透過tableView.reloadRows可以刷新Tableview指定的Cell
但可能Cell不存在的情況下reloadRows,會出現下圖的訊息

Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (8) must be equal to the number of rows contained in that section before the update (0), plus or minus the number of rows inserted or deleted from that section (0 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out). Table view: <UITableView: 0x7fbe698e8e00; frame = (0 20; 414 667); clipsToBounds = YES; autoresize = RM+BM; gestureRecognizers = <NSArray: 0x6000006d2fa0>; layer = <CALayer: 0x600000947540>; contentOffset: {0, 0}; contentSize: {414, 0}; adjustedContentInset: {0, 0, 0, 0}; dataSource: <: 0x7fbe6c610580>>’
可以參考本文排除錯誤