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 currentStep = appDelegate.currentStep
|
||||||
let stepBySteps = appDelegate.textSteps
|
let stepBySteps = appDelegate.textSteps
|
||||||
let focusInstruction = (stepBySteps?[indexPath.row].instructions)!
|
let focusInstruction = (stepBySteps?[indexPath.row].instructions)!
|
||||||
|
let focusDistance = (stepBySteps?[indexPath.row].distance)!
|
||||||
if focusInstruction == "" {
|
if focusInstruction == "" {
|
||||||
cell.textLabel?.text = "Start" }
|
cell.textLabel?.text = "Start" }
|
||||||
else {
|
else {
|
||||||
cell.textLabel?.text = focusInstruction }
|
cell.textLabel?.text = "In \(focusDistance)m, \(focusInstruction)" }
|
||||||
if indexPath.row == currentStep {
|
if indexPath.row == currentStep {
|
||||||
cell.backgroundColor = .green }
|
cell.backgroundColor = .green }
|
||||||
else {
|
else {
|
||||||
@ -38,6 +39,11 @@ class WrittenInstructionsViewController: UIViewController, UITableViewDelegate,
|
|||||||
return cell
|
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