adding stuff

This commit is contained in:
Max Hunt 2019-05-29 02:20:18 +01:00
parent d357588a6c
commit d08cbf8da9
10 changed files with 116 additions and 12 deletions

View File

@ -20,6 +20,7 @@
50A7ADFD229D766800D58743 /* 7_ReadyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50A7ADFC229D766800D58743 /* 7_ReadyViewController.swift */; };
50A7ADFF229D768900D58743 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50A7ADFE229D768900D58743 /* MainViewController.swift */; };
50A7AE02229D7B1100D58743 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50A7AE01229D7B1100D58743 /* MapKit.framework */; };
50A9B4E1229E115B00070F61 /* Video.mov in Resources */ = {isa = PBXBuildFile; fileRef = 50A9B4E0229E115B00070F61 /* Video.mov */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@ -39,6 +40,7 @@
50A7ADFE229D768900D58743 /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
50A7AE01229D7B1100D58743 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; };
50A7AE05229D7B1E00D58743 /* Guibe.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Guibe.entitlements; sourceTree = "<group>"; };
50A9B4E0229E115B00070F61 /* Video.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = Video.mov; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -74,6 +76,7 @@
isa = PBXGroup;
children = (
50A7AE05229D7B1E00D58743 /* Guibe.entitlements */,
50A9B4E0229E115B00070F61 /* Video.mov */,
50A7ADD4229D6A4200D58743 /* AppDelegate.swift */,
50A7ADD6229D6A4200D58743 /* ViewController.swift */,
50A7ADE6229D6C7100D58743 /* Assets.xcassets */,
@ -171,6 +174,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
50A9B4E1229E115B00070F61 /* Video.mov in Resources */,
50A7ADDF229D6A4200D58743 /* LaunchScreen.storyboard in Resources */,
50A7ADE7229D6C7100D58743 /* Assets.xcassets in Resources */,
50A7ADDA229D6A4200D58743 /* Main.storyboard in Resources */,

View File

@ -15,12 +15,12 @@ class W2lcomeViewController: UIViewController, CLLocationManagerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
sleep(1)
// sleep(1)
self.locationManager.requestAlwaysAuthorization()
let xstatus = CLLocationManager.authorizationStatus()
if xstatus == CLAuthorizationStatus.authorizedAlways || xstatus == CLAuthorizationStatus.authorizedWhenInUse{
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
let nextViewController = self.storyboard?.instantiateViewController(withIdentifier: "screen3") as! S3artViewController
nextViewController.modalTransitionStyle = .crossDissolve
self.present(nextViewController, animated: true, completion: nil)

View File

@ -10,6 +10,11 @@ import UIKit
class S3artViewController: UIViewController {
@IBAction func startBtnPressed(_ sender: Any) {
let nextViewController = self.storyboard?.instantiateViewController(withIdentifier: "screen4") as! V4deoViewController
nextViewController.modalTransitionStyle = .crossDissolve
self.present(nextViewController, animated: true, completion: nil)
}
override func viewDidLoad() {
super.viewDidLoad()

View File

@ -7,8 +7,12 @@
//
import UIKit
import AVKit
import AVFoundation
class V4deoViewController: UIViewController {
@IBOutlet var videoBtn: UIButton!
@IBOutlet var nextBtn: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
@ -16,6 +20,31 @@ class V4deoViewController: UIViewController {
// Do any additional setup after loading the view.
}
@IBAction func nextBtnPressed(_ sender: Any) {
let nextViewController = self.storyboard?.instantiateViewController(withIdentifier: "screen5") as! H5ndChoiceViewController
nextViewController.modalTransitionStyle = .crossDissolve
self.present(nextViewController, animated: true, completion: nil)
}
@IBAction func videoBtnPress(_ sender: Any) {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.videoBtn.isHidden = true
self.nextBtn.isHidden = false}
playVideo()
}
private func playVideo() {
guard let path = Bundle.main.path(forResource: "Video", ofType:"mov") else {
debugPrint("Video.mov not found")
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

View File

@ -10,6 +10,21 @@ import UIKit
class H5ndChoiceViewController: UIViewController {
let defaults = UserDefaults.standard
@IBAction func lftHandPressed(_ sender: Any) {
defaults.set(1, forKey: "handSide")
let nextViewController = self.storyboard?.instantiateViewController(withIdentifier: "screen6") as! S6deChoiceViewController
nextViewController.modalTransitionStyle = .crossDissolve
self.present(nextViewController, animated: true, completion: nil)
}
@IBAction func ritHandPressed(_ sender: Any) {
defaults.set(2, forKey: "handSide")
let nextViewController = self.storyboard?.instantiateViewController(withIdentifier: "screen6") as! S6deChoiceViewController
nextViewController.modalTransitionStyle = .crossDissolve
self.present(nextViewController, animated: true, completion: nil)
}
override func viewDidLoad() {
super.viewDidLoad()

View File

@ -10,6 +10,21 @@ import UIKit
class S6deChoiceViewController: UIViewController {
let defaults = UserDefaults.standard
@IBAction func topBigPressed(_ sender: Any) {
defaults.set(1, forKey: "bigSide")
let nextViewController = self.storyboard?.instantiateViewController(withIdentifier: "screen7") as! R7adyViewController
nextViewController.modalTransitionStyle = .crossDissolve
self.present(nextViewController, animated: true, completion: nil)
}
@IBAction func bottomBigPressed(_ sender: Any) {
defaults.set(2, forKey: "bigSide")
let nextViewController = self.storyboard?.instantiateViewController(withIdentifier: "screen7") as! R7adyViewController
nextViewController.modalTransitionStyle = .crossDissolve
self.present(nextViewController, animated: true, completion: nil)
}
override func viewDidLoad() {
super.viewDidLoad()

View File

@ -13,6 +13,12 @@ class R7adyViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
let nextViewController = self.storyboard?.instantiateViewController(withIdentifier: "mainScreen") as! MainViewController
nextViewController.modalTransitionStyle = .crossDissolve
self.present(nextViewController, animated: true, completion: nil)
}
// Do any additional setup after loading the view.
}

View File

@ -68,6 +68,9 @@
<rect key="frame" x="91.411398265853677" y="669" width="228.99999999999977" height="59.999999999999915"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" backgroundImage="startBtn"/>
<connections>
<action selector="startBtnPressed:" destination="S0e-nc-j2W" eventType="touchUpInside" id="1vm-La-3FE"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@ -86,17 +89,33 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="VIDEO" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Mfc-D8-3eu">
<rect key="frame" x="65.473151620259159" y="388.69202298550181" width="282" height="119.9999999999999"/>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="C2A-QW-MS5">
<rect key="frame" x="68" y="384" width="282" height="132"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="100"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<state key="normal" title="VIDEO"/>
<connections>
<action selector="videoBtnPress:" destination="8xf-T6-H67" eventType="touchUpInside" id="79U-fi-MQK"/>
</connections>
</button>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OKY-Ox-Fry">
<rect key="frame" x="84" y="382" width="247" height="132"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="100"/>
<state key="normal" title="NEXT"/>
<connections>
<action selector="nextBtnPressed:" destination="8xf-T6-H67" eventType="touchUpInside" id="jiS-c4-YM2"/>
<action selector="videoBtnPress:" destination="8xf-T6-H67" eventType="touchUpInside" id="KUt-Gq-XsB"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<viewLayoutGuide key="safeArea" id="MT9-Vx-1hz"/>
</view>
<connections>
<outlet property="nextBtn" destination="OKY-Ox-Fry" id="1eC-SF-kyz"/>
<outlet property="videoBtn" destination="C2A-QW-MS5" id="EGo-Cn-Jbc"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Dhl-P2-3k6" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
@ -119,12 +138,18 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" backgroundImage="s1l"/>
<connections>
<action selector="lftHandPressed:" destination="1fA-dZ-9ei" eventType="touchUpInside" id="6or-Mz-hWx"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleAspectFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gt2-6x-6Ha">
<rect key="frame" x="96" y="607" width="223" height="227"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" backgroundImage="s1r"/>
<connections>
<action selector="ritHandPressed:" destination="1fA-dZ-9ei" eventType="touchUpInside" id="lim-hM-PE5"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@ -152,12 +177,18 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" backgroundImage="s2t"/>
<connections>
<action selector="topBigPressed:" destination="Y31-kj-JwL" eventType="touchUpInside" id="NA2-M0-uu3"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleAspectFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tvs-dW-FeO">
<rect key="frame" x="88" y="602" width="237" height="235"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" backgroundImage="s2b"/>
<connections>
<action selector="bottomBigPressed:" destination="Y31-kj-JwL" eventType="touchUpInside" id="0z4-tt-ChI"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@ -192,7 +223,7 @@
<!--Main View Controller-->
<scene sceneID="55K-vG-ne9">
<objects>
<viewController storyboardIdentifier="mainView" useStoryboardIdentifierAsRestorationIdentifier="YES" id="Ovf-sw-BKp" customClass="MainViewController" customModule="Guibe" customModuleProvider="target" sceneMemberID="viewController">
<viewController storyboardIdentifier="mainScreen" useStoryboardIdentifierAsRestorationIdentifier="YES" id="Ovf-sw-BKp" customClass="MainViewController" customModule="Guibe" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="x4u-9U-kMO">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>

BIN
Guibe/Video.mov Normal file

Binary file not shown.

View File

@ -17,7 +17,6 @@ class ViewController: UIViewController {
let setupDone = defaults.integer(forKey: "setupDone")
if setupDone != 2 {
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
let nextViewController = self.storyboard?.instantiateViewController(withIdentifier: "screen2") as! W2lcomeViewController