Make Swift UITableView's cell highlight when tapped -
how make every cell have dark layer on unless selected, , when selected make layer fade out?
i have tried using subviews on cell didn't work because didn't show up.
every cell has patternimage background image.
one option in general when wanting customize tableview cells subclass them.
so, example:
class mycustomtableviewcell: uitableviewcell { var pattern: pattern? override func setselected(_ selected: bool, animated: bool) { super.setselected(selected, animated: animated) // configure view selected state }
there variety of methods can override.
see https://developer.apple.com/reference/uikit/uitableviewcell
Comments
Post a Comment