Update TreatmentsViewController.swift

add a disclosure indicator to each cell row to indicate to the user that they can click to edit the treatment
This commit is contained in:
Paul Plant 2022-06-05 20:57:47 +02:00
parent a4b8e67ff1
commit 7a801a484e
1 changed files with 7 additions and 1 deletions

View File

@ -174,7 +174,13 @@ extension TreatmentsViewController: UITableViewDelegate, UITableViewDataSource {
let treatment = treatmentCollection.getTreatment(dateIndex: indexPath.section, treatmentIndex: indexPath.row)
cell.setupWithTreatment(treatment)
// clicking the cell will always open a new screen which allows the user to edit the treatment
cell.accessoryType = .disclosureIndicator
// set color of disclosureIndicator to ConstantsUI.disclosureIndicatorColor
cell.accessoryView = DTCustomColoredAccessory(color: ConstantsUI.disclosureIndicatorColor)
return cell
}