-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    ProductTypeCell *mProductTypeCell = [tableView dequeueReusableCellWithIdentifier:productTypeindterfier];
    mProductTypeCell.selectedBackgroundView = [[UIView alloc] initWithFrame:mProductTypeCell.frame];
    mProductTypeCell.selectedBackgroundView.backgroundColor  = [UIColor whiteColor];
//    另外修改字体的颜色
    mProductTypeCell.typeLable.highlightedTextColor = RGB(0x00bdbe);
    ProductListModel *mProductListModel = _dataArray[indexPath.row];
    mProductTypeCell.typeLable.text = [NSString stringWithFormat:@"%@",mProductListModel.productTypeName];
//默认中    
[_productTableView selectRowAtIndexPath:[NSIndexPath indexPathForItem:
0 inSection:0] animated:YES scrollPosition:UITableViewScrollPositionTop]; if ([_productTableView.delegate respondsToSelector:@selector(tableView:didSelectRowAtIndexPath:)]) {
[_productTableView.
delegate tableView:_productTableView didSelectRowAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0]]; } return mProductTypeCell; }

 

相关文章:

  • 2021-08-26
  • 2021-11-27
  • 2021-10-30
  • 2022-12-23
  • 2021-11-16
  • 2021-10-30
  • 2021-05-18
  • 2022-12-23
猜你喜欢
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2021-09-30
  • 2021-09-15
  • 2022-12-23
相关资源
相似解决方案