【问题标题】:How to display selection button when selection style is none in UITableview in ios?如何在ios的UITableview中选择样式为无时显示选择按钮?
【发布时间】:2014-09-17 07:15:10
【问题描述】:

我需要设置

    cell.selectionStyle = UITableViewCellSelectionStyleNone;

在我的表格视图中。我可以检查多个单元格以删除行。这样做时,左侧选择的默认图像(带刻度的圆圈)不会显示。当我将选择样式设置为

` UITableViewCellSelectionStyleBlue
  UITableViewCellSelectionStyleGray
  UITableViewCellSelectionStyleDefault`

我的问题是,当 tableview 中没有选择样式时,有什么方法可以显示选择按钮?

【问题讨论】:

标签: ios objective-c iphone uitableview


【解决方案1】:

你可以留下UITableViewCellSelectionStyleDefault

如果要更改单元格的选定颜色:

UIView *colorView = [[UIView alloc] init];
colorView.backgroundColor = [UIColor clearColor];
[cell setSelectedBackgroundView:colorView];

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-02-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多