需求: Cell不重用
思路: 让每个cell的标识都不一样,缺点:显示内容比较多时内存占用也是比较多
代码:
// static NSString *reuseID = @"testCell"; NSString *reuseID = [NSString stringWithFormat:@"cell%ld%ld",(long)indexPath.section,(long)indexPath.row]; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseID]; ...
转载请注明来源: UITableViewCell不重用代码 - 朱凯博客
支付宝
微信