在tableViewcell里嵌套了collectionview cell作为collectionview的delegate和dataSource,给cell赋值时 collectionview reloaddata会卡顿一下,collectionview有9个item,固定的,怎么办呀?
`- (void)setValueWithDataArray:(NSMutableArray *)dataArray {
[self.dataSource removeAllObjects];
[self.dataSource addObjectsFromArray:dataArray];
[self.collectionView reloadData];
}
`
可以试试把刷新操作放在一个 [UIView animation...]
的动画里,duration 为 0
你就不该这样设计