i have created one custom cell, in which i have one button. i want to change colour of cell on that button click (not on didSelect row). I have given tag to button in cellforrow method and called selector method.
btnCell.tag = indexPath.row
btnCell.addTarget(self, action: #selector(buttonClicked( sender:)),for: .touchUpInside)
func buttonClicked(sender:UIButton) {
//how can i change cell color on button this click
}
how can i create cell object in button action and change cell color? answer in objective-c also welcome.