您必须为表中的每一行动态创建一个 matchView。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"CellIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:CellIdentifier] autorelease];
}
UIView *matchView = [[[UIView alloc]init]autorelease];
[matchView setFrame:CGRectMake(0, 0, width_of_your_table, height_of_your_table_cell)];
//add here, in your matchView whatever content you need to be displaied
[cell addSubview:matchView];
return cell;
}