代码之家  ›  专栏  ›  技术社区  ›  Benjamin Egelund-Müller

UITableView编辑模式问题(iPhone SDK)

  •  1
  • Benjamin Egelund-Müller  · 技术社区  · 16 年前

    我有一个填充了自定义tableViewCell的tableView。这些单元格不是子类,它们只是经过大量调整和“子视图添加”(在 cellForRowAtIndexPath

    PICTURE_1

    cell.accessoryView.backgroundColor = [UIColor clearColor]

    1 回复  |  直到 16 年前
        1
  •  1
  •   Ben Gottlieb    16 年前

    看起来你需要为你的单元格分配一个背景视图,并给它一个背景颜色:

    cell.backgroundView = [[[UIView alloc] initWithFrame: cell.bounds] autorelease]; cell.backgroundView.backgroundColor = [UIColor gray];