diff --git a/Yep/Show.storyboard b/Yep/Show.storyboard
index 68858dd4..8b792de1 100644
--- a/Yep/Show.storyboard
+++ b/Yep/Show.storyboard
@@ -59,24 +59,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -278,6 +260,13 @@
+
+
+
+
+
+
+
diff --git a/Yep/ViewControllers/Show/ShowStepGeniusViewController.swift b/Yep/ViewControllers/Show/ShowStepGeniusViewController.swift
index 36cf8216..41765758 100644
--- a/Yep/ViewControllers/Show/ShowStepGeniusViewController.swift
+++ b/Yep/ViewControllers/Show/ShowStepGeniusViewController.swift
@@ -8,7 +8,7 @@
import UIKit
-class ShowStepGeniusViewController: UIViewController {
+class ShowStepGeniusViewController: ShowStepViewController {
@IBOutlet weak var rightPurpleDot: UIImageView!
@IBOutlet weak var leftGreenDot: UIImageView!
@@ -46,21 +46,5 @@ class ShowStepGeniusViewController: UIViewController {
let dotsLinkPath = UIBezierPath(arcCenter: dotsLink.center, radius: 5, startAngle: 0, endAngle: 2, clockwise: false)
repeatAnimate(dotsLink, alongWithPath: dotsLinkPath, duration: 7, autoreverses: true)
}
-
- func repeatAnimate(view: UIView, alongWithPath path: UIBezierPath, duration: CFTimeInterval, autoreverses: Bool = false) {
-
- let animation = CAKeyframeAnimation(keyPath: "position")
-
- animation.calculationMode = kCAAnimationPaced
- animation.fillMode = kCAFillModeForwards
- animation.duration = duration
- animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear)
- animation.repeatCount = Float.infinity
- animation.autoreverses = autoreverses
-
- animation.path = path.CGPath
-
- view.layer.addAnimation(animation, forKey: "Animation")
- }
}
diff --git a/Yep/ViewControllers/Show/ShowStepMatchViewController.swift b/Yep/ViewControllers/Show/ShowStepMatchViewController.swift
index 0fa6d044..2373fefb 100644
--- a/Yep/ViewControllers/Show/ShowStepMatchViewController.swift
+++ b/Yep/ViewControllers/Show/ShowStepMatchViewController.swift
@@ -8,28 +8,22 @@
import UIKit
-class ShowStepMatchViewController: UIViewController {
+class ShowStepMatchViewController: ShowStepViewController {
+
+ @IBOutlet weak var camera: UIImageView!
+ @IBOutlet weak var pen: UIImageView!
+ @IBOutlet weak var book: UIImageView!
+ @IBOutlet weak var controller: UIImageView!
+ @IBOutlet weak var keyboard: UIImageView!
override func viewDidLoad() {
super.viewDidLoad()
-
- // Do any additional setup after loading the view.
}
- override func didReceiveMemoryWarning() {
- super.didReceiveMemoryWarning()
- // Dispose of any resources that can be recreated.
+ override func viewDidAppear(animated: Bool) {
+ super.viewDidAppear(animated)
+
+
+
}
-
-
- /*
- // MARK: - Navigation
-
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
- // Get the new view controller using segue.destinationViewController.
- // Pass the selected object to the new view controller.
- }
- */
-
}
diff --git a/Yep/ViewControllers/Show/ShowStepViewController.swift b/Yep/ViewControllers/Show/ShowStepViewController.swift
index 03d39ccf..bff4470c 100644
--- a/Yep/ViewControllers/Show/ShowStepViewController.swift
+++ b/Yep/ViewControllers/Show/ShowStepViewController.swift
@@ -10,9 +10,19 @@ import UIKit
class ShowStepViewController: UIViewController {
- var showName: String?
+ func repeatAnimate(view: UIView, alongWithPath path: UIBezierPath, duration: CFTimeInterval, autoreverses: Bool = false) {
- override func viewDidLoad() {
- super.viewDidLoad()
+ let animation = CAKeyframeAnimation(keyPath: "position")
+
+ animation.calculationMode = kCAAnimationPaced
+ animation.fillMode = kCAFillModeForwards
+ animation.duration = duration
+ animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear)
+ animation.repeatCount = Float.infinity
+ animation.autoreverses = autoreverses
+
+ animation.path = path.CGPath
+
+ view.layer.addAnimation(animation, forKey: "Animation")
}
}
diff --git a/Yep/ViewControllers/Show/ShowViewController.swift b/Yep/ViewControllers/Show/ShowViewController.swift
index e5b890b1..c20b4cd0 100644
--- a/Yep/ViewControllers/Show/ShowViewController.swift
+++ b/Yep/ViewControllers/Show/ShowViewController.swift
@@ -28,7 +28,7 @@ class ShowViewController: UIViewController {
let stepA = stepGenius()
let stepB = stepMatch()
- let stepC = step("Yep Intro")
+ let stepC = stepMatch()
steps = [stepA, stepB, stepC]
@@ -79,21 +79,6 @@ class ShowViewController: UIViewController {
return step
}
- private func step(name: String) -> ShowStepViewController {
-
- let step = storyboard!.instantiateViewControllerWithIdentifier("ShowStepViewController") as! ShowStepViewController
-
- step.showName = name
-
- step.view.setTranslatesAutoresizingMaskIntoConstraints(false)
- scrollView.addSubview(step.view)
-
- addChildViewController(step)
- step.didMoveToParentViewController(self)
-
- return step
- }
-
// MARK: Actions
@IBAction func finish(sender: UIButton) {