IOS在Cell上的优化使人以为底层框架的成熟,但是有些情形却会形成没必要要的麻烦,框架
当使用了优化
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:Identifier];
有可能会形成画面重复的问题,此句的意思是,从tableView的队列里取出以"Identifier"名称的cell进行重用.因此问题一定会出现!spa
解决办法以下:code
UITableViewCell *cell = nil; if (!cell) { cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:Identifier]; }else{ while (cell.contentView.subviews.lastObject != nil) { [cell.contentView.subviews.lastObject removeFromSuperview];//重组cell } }