Hi. I'd like to know if it's possible to add an action to a disclosure button. I'm using LabelRow.
I know that on cellUpdate I can do this:
.cellUpdate { cell, row in
cell.accessoryType = .DetailDisclosureButton
}
But how do I retrieve that button and add a selector to it.
Thanks,
Allan
Found a solution but I don't know if this is correct: override the func tableView(tableView: UITableView, accessoryButtonTappedForRowWithIndexPath indexPath: NSIndexPath) on the class inheriting FormViewController.
OK sorry for spamming but I got it:
.cellUpdate { cell, row in
let button = UIButton(type: .DetailDisclosure)
button.addTarget(...)
cell.accessoryView = button
}
I hope this helps someone in the future.
Most helpful comment
OK sorry for spamming but I got it:
I hope this helps someone in the future.