页面
郏国上
Object C, JavaScript, python高级研发工程师
展开
-
iOS UITableViewCell刷新某些行的cell或section
//一个section刷新NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2];[tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];//一个或多个cell刷新NSIndexPath *indexPath1=[NSIndexPath indexPathForRow:2 inSection:0];NSIndexPath *i原创 2022-01-18 15:19:55 · 1152 阅读 · 0 评论 -
UICollectionView 刷新指定单元格或刷指定分区
为了避免重新加载时出现不需要的动画(又名“闪烁”)BOOL animationsEnabled = [UIView areAnimationsEnabled];[UIView setAnimationsEnabled:NO];NSIndexPath *indexPath=[NSIndexPath indexPathForRow:2 inSection:0];[self.collectionView reloadItemsAtIndexPaths:[NSArray arrayWithObjects:i原创 2022-01-18 15:15:05 · 3877 阅读 · 0 评论