I am working with UISwitch
in UITableViewCell
and I am passing the row
like bellow:
.....
cell.swcSelectCourse.tag = indexPath.row
cell.swcSelectCourse.addTarget(self, action: #selector(handleSWCSelectCourse(sender:)), for: .valueChanged)
.....
@objc func handleSWCSelectCourse(sender: UISwitch){
let row = sender.tag
let section = ?????
let selectedIndex = IndexPath(row: row, section: ????)
}
But I need to section
now, how can i pass section to @objc func handleSWCSelectCourse
?