diff --git a/Guibe.xcodeproj/project.pbxproj b/Guibe.xcodeproj/project.pbxproj index 5e40f2e..eb570f3 100644 --- a/Guibe.xcodeproj/project.pbxproj +++ b/Guibe.xcodeproj/project.pbxproj @@ -29,6 +29,8 @@ 50B1485E22A46F7A008B16AF /* VideoInstrictionsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50B1485D22A46F7A008B16AF /* VideoInstrictionsViewController.swift */; }; 50C69B1122A16A7100EA99C1 /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50C69B1022A16A7100EA99C1 /* TableViewController.swift */; }; 50C69B1322A19D8800EA99C1 /* NewTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50C69B1222A19D8800EA99C1 /* NewTableViewCell.swift */; }; + 50E3DDF122AC59EA00E04D0B /* placeholder.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 50E3DDF022AC59EA00E04D0B /* placeholder.mp4 */; }; + 50E3DDF322AC5F9200E04D0B /* setupTextInstructionsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E3DDF222AC5F9200E04D0B /* setupTextInstructionsViewController.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -57,6 +59,8 @@ 50B1485D22A46F7A008B16AF /* VideoInstrictionsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoInstrictionsViewController.swift; sourceTree = ""; }; 50C69B1022A16A7100EA99C1 /* TableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = ""; }; 50C69B1222A19D8800EA99C1 /* NewTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewTableViewCell.swift; sourceTree = ""; }; + 50E3DDF022AC59EA00E04D0B /* placeholder.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = placeholder.mp4; sourceTree = ""; }; + 50E3DDF222AC5F9200E04D0B /* setupTextInstructionsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = setupTextInstructionsViewController.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -95,11 +99,13 @@ 506421C322A339B7001E8877 /* xleft.mp3 */, 506421C422A339B7001E8877 /* xright.mp3 */, 50A7AE05229D7B1E00D58743 /* Guibe.entitlements */, + 50E3DDF022AC59EA00E04D0B /* placeholder.mp4 */, 50A9B4E0229E115B00070F61 /* Video.mov */, 50A7ADD4229D6A4200D58743 /* AppDelegate.swift */, 50A7ADD6229D6A4200D58743 /* ViewController.swift */, 50A7ADE6229D6C7100D58743 /* Assets.xcassets */, 50A7ADD8229D6A4200D58743 /* Main.storyboard */, + 50E3DDF222AC5F9200E04D0B /* setupTextInstructionsViewController.swift */, 50B1485D22A46F7A008B16AF /* VideoInstrictionsViewController.swift */, 50B1485B22A46EBD008B16AF /* WrittenInstructionsViewController.swift */, 50A7ADFE229D768900D58743 /* MainViewController.swift */, @@ -199,6 +205,7 @@ buildActionMask = 2147483647; files = ( 50A9B4E1229E115B00070F61 /* Video.mov in Resources */, + 50E3DDF122AC59EA00E04D0B /* placeholder.mp4 in Resources */, 506421C522A339B7001E8877 /* xboth.mp3 in Resources */, 506421C622A339B7001E8877 /* xleft.mp3 in Resources */, 50A7ADDF229D6A4200D58743 /* LaunchScreen.storyboard in Resources */, @@ -219,6 +226,7 @@ 506421CD22A33EA5001E8877 /* TechSpecsViewController.swift in Sources */, 50A7ADF9229D75C100D58743 /* 5_HandChoiceViewController.swift in Sources */, 50B1485E22A46F7A008B16AF /* VideoInstrictionsViewController.swift in Sources */, + 50E3DDF322AC5F9200E04D0B /* setupTextInstructionsViewController.swift in Sources */, 50B1485C22A46EBD008B16AF /* WrittenInstructionsViewController.swift in Sources */, 50A7ADD7229D6A4200D58743 /* ViewController.swift in Sources */, 50C69B1122A16A7100EA99C1 /* TableViewController.swift in Sources */, diff --git a/Guibe/Base.lproj/Main.storyboard b/Guibe/Base.lproj/Main.storyboard index 70034b1..fd95708 100644 --- a/Guibe/Base.lproj/Main.storyboard +++ b/Guibe/Base.lproj/Main.storyboard @@ -29,7 +29,7 @@ - + @@ -79,7 +79,7 @@ - + @@ -130,7 +130,7 @@ - + @@ -181,7 +181,7 @@ - + @@ -206,7 +206,7 @@ - + @@ -344,7 +344,7 @@ - + @@ -385,7 +385,7 @@ - + + @@ -432,6 +462,7 @@ + @@ -513,8 +544,8 @@ - + @@ -788,7 +847,7 @@ + + + + + + + + + + + + + + + + + + + To turn on your guibe, press the button on the **side of the bracelet**. Your Guibe bracelet will vibrate to let you know that the connection has been successful. + +Go to the main screen to search for a destination. When ready, select ‘Begin Journey’. You will feel 3 buzzes: ready, steady, go! You are now ready to start the journey and can begin walking. + +If you feel 3 long buzzes, you’ve gone the wrong way! Check back on your home screen to see which direction you should head in. + +When you are on your journey, you might feel a short buzz on your right side, this means you are approaching a right turn. When the long buzz comes shortly after, this means turn right now. If you feel a short buzz followed by a long buzz on your left side, this means turn left now. + +You are almost set, just one more instruction! When you have arrived at your destination, you will feel a short buzz followed by a long buzz continually until you hop on the app to confirm the end of your journey. + +The casing of your device serves as a portable charger. Charge the casing via the mains and simply slip the guibe onto the casing dock to charge it wirelessly. + +And that’s all you need to know to follow the vibe! + + + + + + + + + + + + + @@ -814,13 +940,6 @@ - @@ -839,14 +958,50 @@ + + + + + + + + - + @@ -888,10 +1043,20 @@ + + + + diff --git a/Guibe/InstructionsViewController.swift b/Guibe/InstructionsViewController.swift index 946e969..4bf6225 100644 --- a/Guibe/InstructionsViewController.swift +++ b/Guibe/InstructionsViewController.swift @@ -12,6 +12,7 @@ import MapKit class InstructionsViewController: UIViewController { @IBOutlet weak var separator: UIImageView! @IBOutlet weak var easterEggBtn: UIButton! + @IBOutlet weak var backBtn: UIButton! @IBAction func backBtnPressed(_ sender: Any) { self.dismiss(animated: true, completion: nil) @@ -51,6 +52,7 @@ class InstructionsViewController: UIViewController { super.viewDidLoad() easterEggBtn.accessibilityLabel = "Easter egg, do not press" + backBtn.accessibilityLabel = "Back" // let mvc = MainViewController() // let ivc = WrittenInstructionsViewController() // diff --git a/Guibe/MainViewController.swift b/Guibe/MainViewController.swift index 1b4a9e8..67c3ec4 100644 --- a/Guibe/MainViewController.swift +++ b/Guibe/MainViewController.swift @@ -66,6 +66,10 @@ class MainViewController: UIViewController, AVAudioPlayerDelegate, myProtocol { @IBOutlet weak var persEtaLbl: UILabel! // --------------------- @IBOutlet weak var headingButton: UIButton! +// --------------------- + @IBOutlet weak var naviFinishedView: UIView! + @IBOutlet weak var arrivedAtDestinationBtn: UIButton! + // OUTLETS--------------OUTLETS // ACTIONS--------------ACTIONS @@ -128,8 +132,14 @@ class MainViewController: UIViewController, AVAudioPlayerDelegate, myProtocol { } // -------------------------- + @IBAction func arrivedAtDestinationBtnPressed(_ sender: Any) { + UIView.animate(withDuration: 1, animations: {self.naviFinishedView.alpha = 0.0}) + } -// ACTIONS--------------ACTIONS + @IBAction func xDebug(_ sender: Any) { + finishedNavigationSuccessfully() + } + // ACTIONS--------------ACTIONS override func viewDidLoad() { super.viewDidLoad() @@ -192,6 +202,14 @@ class MainViewController: UIViewController, AVAudioPlayerDelegate, myProtocol { headingButton.layer.shadowOffset = CGSize(width: 5, height: 7) headingButton.layer.shadowRadius = 7 headingButton.layer.shadowOpacity = 0.2 + + naviFinishedView.alpha = 0.0 + + arrivedAtDestinationBtn.layer.shadowColor = UIColor.black.cgColor + arrivedAtDestinationBtn.layer.cornerRadius = 50 + arrivedAtDestinationBtn.layer.shadowOffset = CGSize(width: 5, height: 7) + arrivedAtDestinationBtn.layer.shadowRadius = 50 + arrivedAtDestinationBtn.layer.shadowOpacity = 0.6 menuBtn.accessibilityLabel = "Menu" headingButton.accessibilityLabel = "Heading" @@ -203,6 +221,7 @@ class MainViewController: UIViewController, AVAudioPlayerDelegate, myProtocol { keybDismissBtn.accessibilityLabel = "Dismiss keyboard" mapView.accessibilityElementsHidden = true startNaviImg.accessibilityLabel = "Follow the vibe" + arrivedAtDestinationBtn.accessibilityLabel = "End Navigation" } //END OF VIEW DID LOAD @@ -314,6 +333,7 @@ extension MainViewController: CLLocationManagerDelegate { break; case "The destin": playDone() + finishedNavigationSuccessfully() default: playErr() @@ -337,6 +357,22 @@ extension MainViewController: CLLocationManagerDelegate { } + func finishedNavigationSuccessfully(){ + self.stepCounter = 0 + self.startedNavigation = false + self.appDelegate.naviStarted = false + mapView.removeOverlays(mapView.overlays) + DispatchQueue.main.asyncAfter(deadline: .now() + 1){ + UIView.animate(withDuration: 0.7, animations: { + self.searchView.alpha = 1.0 + self.cancelBtn.alpha = 0.0 + self.persEtaView.alpha = 0.0}) + } + UIView.animate(withDuration: 1, animations: {self.naviFinishedView.alpha = 1.0}) + //Animate alpha doneview and deanimate it + + } + func playRight(){ // currentStepLbl.text = "COM: RIGHT" let path = Bundle.main.path(forResource: "xright", ofType : "mp3")! diff --git a/Guibe/TechSpecsViewController.swift b/Guibe/TechSpecsViewController.swift index e0b8771..910136c 100644 --- a/Guibe/TechSpecsViewController.swift +++ b/Guibe/TechSpecsViewController.swift @@ -9,13 +9,15 @@ import UIKit class TechSpecsViewController: UIViewController { - + @IBOutlet weak var backBtn: UIButton! + @IBAction func goBackPressed(_ sender: Any) { self.dismiss(animated: true, completion: nil) } override func viewDidLoad() { super.viewDidLoad() + backBtn.accessibilityLabel = "Back" // Do any additional setup after loading the view. } diff --git a/Guibe/VideoInstrictionsViewController.swift b/Guibe/VideoInstrictionsViewController.swift index 72e9ad4..9a12410 100644 --- a/Guibe/VideoInstrictionsViewController.swift +++ b/Guibe/VideoInstrictionsViewController.swift @@ -7,21 +7,80 @@ // import UIKit +import AVKit -class VideoInstrictionsViewController: UIViewController { +class VideoInstrictionsViewController: UIViewController, AVAudioPlayerDelegate { + + @IBOutlet weak var tuturialBtn: UIButton! + @IBOutlet weak var setupBtn: UIButton! + @IBOutlet weak var backBtn: UIButton! + @IBAction func backBtnPressed(_ sender: Any) { self.dismiss(animated: true, completion: nil) } + @IBAction func tutorialBtnPressed(_ sender: Any) { + playVideo1() + } + + @IBAction func setupBtnPressed(_ sender: Any) { + playVideo2() + } + + + + override func viewDidLoad() { super.viewDidLoad() - + + tuturialBtn.layer.shadowColor = UIColor.black.cgColor + tuturialBtn.layer.cornerRadius = 9 + tuturialBtn.layer.shadowOffset = CGSize(width: 7, height: 9) + tuturialBtn.layer.shadowRadius = 9 + tuturialBtn.layer.shadowOpacity = 0.4 + + setupBtn.layer.shadowColor = UIColor.black.cgColor + setupBtn.layer.cornerRadius = 9 + setupBtn.layer.shadowOffset = CGSize(width: 7, height: 9) + setupBtn.layer.shadowRadius = 9 + setupBtn.layer.shadowOpacity = 0.4 + + backBtn.accessibilityLabel = "Back" + tuturialBtn.accessibilityLabel = "Usage Tutorial" + setupBtn.accessibilityLabel = "Guibe bracelet setup tutorial" + // Do any additional setup after loading the view. } - + private func playVideo1() { + guard let path = Bundle.main.path(forResource: "placeholder", ofType:"mp4") else { + debugPrint("404") + return } + let player = AVPlayer(url: URL(fileURLWithPath: path)) + let playerController = AVPlayerViewController() + playerController.player = player + // playerController.modalPresentationStyle = .popover + present(playerController, animated: true) { + player.play() + } + } + + private func playVideo2() { + guard let path = Bundle.main.path(forResource: "placeholder", ofType:"mp4") else { + debugPrint("404") + return } + let player = AVPlayer(url: URL(fileURLWithPath: path)) + let playerController = AVPlayerViewController() + playerController.player = player + // playerController.modalPresentationStyle = .popover + present(playerController, animated: true) { + player.play() + } + } + + /* // MARK: - Navigation diff --git a/Guibe/WrittenInstructionsViewController.swift b/Guibe/WrittenInstructionsViewController.swift index 5583801..82ab57c 100644 --- a/Guibe/WrittenInstructionsViewController.swift +++ b/Guibe/WrittenInstructionsViewController.swift @@ -64,10 +64,11 @@ class WrittenInstructionsViewController: UIViewController, UITableViewDelegate, } @IBOutlet weak var instructionsTable: UITableView! - + @IBOutlet weak var backBtn: UIButton! override func viewDidLoad() { super.viewDidLoad() + backBtn.accessibilityLabel = "Back" if appDelegate.naviStarted == false { DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { let alert = UIAlertController(title: "Not Navigating", message: "Please start navigation to see step by step instructions.", preferredStyle: .alert) diff --git a/Guibe/placeholder.mp4 b/Guibe/placeholder.mp4 new file mode 100644 index 0000000..1eee311 Binary files /dev/null and b/Guibe/placeholder.mp4 differ diff --git a/Guibe/settingsViewController.swift b/Guibe/settingsViewController.swift index 481bd58..c91d64a 100644 --- a/Guibe/settingsViewController.swift +++ b/Guibe/settingsViewController.swift @@ -100,8 +100,8 @@ class settingsViewController: UIViewController { bTopBtn.accessibilityLabel = "Big side on top" CSTop.accessibilityLabel = "Small side on top" sTopBtn.accessibilityLabel = "Small side on top" - sideText.accessibilityLabel = "Where would you like to wear Guibe" - teoSideText.accessibilityLabel = "How would you like to wear Guibe?" + sideText.accessibilityLabel = "Where would you like to wear geibe" + teoSideText.accessibilityLabel = "How would you like to wear geibe?" } diff --git a/Guibe/setupTextInstructionsViewController.swift b/Guibe/setupTextInstructionsViewController.swift new file mode 100644 index 0000000..8e6fe77 --- /dev/null +++ b/Guibe/setupTextInstructionsViewController.swift @@ -0,0 +1,39 @@ +// +// setupTextInstructionsViewController.swift +// Guibe +// +// Created by Max Hunt on 08/06/2019. +// Copyright © 2019 8. All rights reserved. +// + +import UIKit + +class setupTextInstructionsViewController: UIViewController { + + + @IBOutlet weak var backBtn: UIButton! + + + + @IBAction func backBtnPressed(_ sender: Any) { + self.dismiss(animated: true, completion: nil) + } + + override func viewDidLoad() { + super.viewDidLoad() + backBtn.accessibilityLabel = "Back" + // Do any additional setup after loading the view. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +}