Open include11 opened 4 years ago
我也遇到这个问题了
我也遇到这个问题了,看了代码,在VTMagicView里修改了下,可以解决这个问题,具体修改如下: reloadDataWithDisIndex 这个方法中 //[self setNeedsLayout]; // [self layoutIfNeeded]; 把这个手动去调用layoutsubViews的方法给干掉就不会出现上述的报错了。因为目前应该也不用去多次手动去触发layoutsubViews方法。
VTMagic[6333:1035842] [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: 0x1060be200; frame = (0 0; 375 603); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x282a10f30>; layer = <CALayer: 0x2824449c0>; contentOffset: {0, 0}; contentSize: {375, 2200}; adjustedContentInset: {0, 0, 49, 0}; dataSource: <_UIFilteredDataSource: 0x282a17e40>>