Создать HTML-файл из rspec

Попробуйте использовать #selector для вызова IBaction.In cellforrowatindexpath

            cell.editButton.tag = indexPath.row
        cell.editButton.addTarget(self, action: #selector(editButtonPressed), for: .touchUpInside)

Таким образом вы можете получить доступ к пути индекса внутри метода editButtonPressed

func editButtonPressed(_ sender: UIButton) {

print(sender.tag)//this value will be same as indexpath.row

}
22
задан random 11 December 2012 в 01:27
поделиться