【问题标题】:how to add colour in verticalSeprator UITable如何在verticalSeprator UITable中添加颜色
【发布时间】:2016-04-01 12:23:25
【问题描述】:

如何在verticalSeperator UITable 中添加特定颜色。我尝试使用UIColor 选项,但它不起作用,请帮我解决这个问题。

HJTextFieldCell *cell = (HJTextFieldCell *)[_tableView dequeueReusableCellWithIdentifier:textCellIdentifier];
cell.constraint_leftSideOftxtFild.constant = 10.0f;
cell.constraint_heigntOfTxtField.constant  = 30.0f;
cell.lbl_verticalSeprator.hidden =NO;
cell.lbl_verticalSeprator.textColor = [UIColor colorWithRed:0.0/255.0 green:0.0/255.0 blue:0.098/255.0 alpha:0.22];

【问题讨论】:

    标签: ios uitableview cell uicolor separator


    【解决方案1】:

    尝试使用背景颜色而不是文本颜色。

    cell.lbl_verticalSeprator.backgroundColor = [UIColor colorWithRed:0.0/255.0 green:0.0/255.0 blue:0.098/255.0 alpha:0.22];
    

    最好的方法是使用原生分隔符,您可以使用tableView.separatorColorUITableview 更改颜色

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-12
      • 1970-01-01
      • 1970-01-01
      • 2022-11-03
      • 2023-01-09
      • 2017-12-06
      相关资源
      最近更新 更多