Why does UITableViewCell remain highlighted?

前端 未结 18 1299
余生分开走
余生分开走 2020-12-12 12:45

What would cause a table view cell to remain highlighted after being touched? I click the cell and can see it stays highlighted as a detail view is pushed. Once the detail

18条回答
  •  情书的邮戳
    2020-12-12 13:17

    I've been having the same issue for long time so in case anyone else is struggling:

    Take a look at your -tableView: cellForRowAtIndexPath: and see if you are creating cells or using a 'reuse identifier'. If the latter, make sure that your table in IB has a cell with that identifier. If you're not using a reuse Identifier just create a new cell for each row.

    This should then give your table the expected 'fade selected row' on appearing.

提交回复
热议问题