Tweaking the instructions

This commit is contained in:
Max Hunt 2019-06-03 00:35:51 +01:00
parent f0e5a9c5a3
commit d41826757d

View File

@ -27,10 +27,11 @@ class WrittenInstructionsViewController: UIViewController, UITableViewDelegate,
let currentStep = appDelegate.currentStep
let stepBySteps = appDelegate.textSteps
let focusInstruction = (stepBySteps?[indexPath.row].instructions)!
let focusDistance = (stepBySteps?[indexPath.row].distance)!
if focusInstruction == "" {
cell.textLabel?.text = "Start" }
else {
cell.textLabel?.text = focusInstruction }
cell.textLabel?.text = "In \(focusDistance)m, \(focusInstruction)" }
if indexPath.row == currentStep {
cell.backgroundColor = .green }
else {
@ -38,6 +39,11 @@ class WrittenInstructionsViewController: UIViewController, UITableViewDelegate,
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
// Maybe speak this?
self.dismiss(animated: true, completion: nil)
}