Tweaking the instructions
This commit is contained in:
parent
f0e5a9c5a3
commit
d41826757d
@ -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)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user