- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
if(tableView==logTable)
{
lbl_description=[[UILabel alloc] init];
[cell.contentView addSubview:lbl_description];
lbl_description.backgroundColor = [UIColor clearColor];
lbl_description.textColor=[UIColor darkGrayColor];
lbl_description.font = [UIFont systemFontOfSize:18];
lbl_date=[[UILabel alloc] init];
[cell.contentView addSubview:lbl_date];
lbl_date.backgroundColor = [UIColor clearColor];
lbl_date.textColor=[UIColor lightGrayColor];
lbl_date.font = [UIFont systemFontOfSize:14];
lbl_description.frame=CGRectMake(10, 3, 300, 25);
lbl_date.frame=CGRectMake(10, 23, 300, 25);//left
lbl_description.text = [getName objectAtIndex:indexPath.row];
lbl_date.text=[getStartDate objectAtIndex:indexPath.row];
}
return cell;
}
UITable 重叠,当我尝试重新加载它时,它不会动态更新自身。我使用表重新加载进行重新加载,但我仍然没有得到解决方案。提前致谢..