1.0自定义 controller 及 xib, 在创建 cell 是使用
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"Cell" owner:self options:nil];
cell = [nib objectAtIndex:0];
即可直接使用 xib 的文件.
2.0 点击 cell更改cell内部控件的属性, 需先获取点击的模型
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
Cell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.PlayImage.hidden = NO;
cell.PauseImage.hidden = NO;
// [tableView beginUpdates];
// [tableView endUpdates];
}
- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath
{
Cell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.PlayImage.hidden = YES;
cell.PauseImage.hidden = YES;
}