I'm building a simple TableViewController, with a Custom TableViewCell.
In this TableViewCell I have
1) ImageView 2) Label 3) Switch Button
Now for example I have when I try to start my application 5 row. I want to start a method if the user click on switch button of one of the rows items.
So I have build this method:
@IBAction func attivaLuci(sender: UISwitch) {
if sender.on {
//ATTIVO LA LUCE CORRISPONDENTE
}else{
//DISATTIVO LA LUCE CORRISPONDENTE
}
}
now how can I get the rowIndex of the cell?