- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier];
if (cell == nil) {
cell = [[[uitableviewcell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}else{
while ([cell.contentview.subviews lastobject] != nil) {
[(uiview*)[cell.contentview.subviews lastobject] removeFromSuperview]; //删除并进行重新分配
}
}
NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier];
if (cell == nil) {
cell = [[uitableviewcell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
for (UIView *subView in cell.contentView.subviews) {
[subview removefromsuperview];
}