tableview刷新界面時清除舊數(shù)據(jù)(單例的數(shù)據(jù))
if (cell == nil) {
cell = [[HPMTableViewCell alloc] initWithStyle:(UITableViewCellStyleValue1) reuseIdentifier:indentifier];
}else{
//cell中本來就有一個subview,如果是重用cell,則把cell中自己添加的subview清除掉,避免出現(xiàn)重疊問題
for (UIView *subView in cell.contentView.subviews)
{
[subView removeFromSuperview];
}
}