How do I set UITableViewCellSelectionStyle property to some custom color?

前端 未结 9 1747
栀梦
栀梦 2020-12-13 04:04

I am developing an iPhone application, in my table view I wanted custom color for Cell Selection Style, I read the UITableViewCell Class Reference but there are onl

9条回答
  •  再見小時候
    2020-12-13 04:54

    Setting the selectedBackgroundView seems to have no effect when the cell.selectionStyle is set to UITableViewCellSelectionStyleNone. When I don't set the style is just uses the default gray.

    Using the first suggestion that inserts the custom UIView into the cell does manipulate the cell but it doesn't show up when the cell is touched, only after the selected action is completed which is too late because I'm pushing to a new view. How do I get the selected view in the cell to display before the beginning of the selected operation?

提交回复
热议问题