From 2b6b0989b46746e0b56de89a771907ba2de165a8 Mon Sep 17 00:00:00 2001 From: Max Hunt Date: Wed, 12 Jun 2019 02:37:51 +0100 Subject: [PATCH] update --- Guibe/InstructionsViewController.swift | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Guibe/InstructionsViewController.swift b/Guibe/InstructionsViewController.swift index 07c8d11..99f0d89 100644 --- a/Guibe/InstructionsViewController.swift +++ b/Guibe/InstructionsViewController.swift @@ -28,14 +28,16 @@ class InstructionsViewController: UIViewController { @IBAction func easterEggPressed(_ sender: Any) { self.separator.isHidden = true + self.separator.alpha = 0.0 UIView.animate(withDuration: 0.2, animations: {self.view.backgroundColor = .green}) - DispatchQueue.main.asyncAfter(deadline: .now() + 0.4) {UIView.animate(withDuration: 0.2, animations: {self.view.backgroundColor = .red})} - DispatchQueue.main.asyncAfter(deadline: .now() + 0.8) {UIView.animate(withDuration: 0.2, animations: {self.view.backgroundColor = .blue})} - DispatchQueue.main.asyncAfter(deadline: .now() + 1.2) {UIView.animate(withDuration: 0.2, animations: {self.view.backgroundColor = .yellow})} - DispatchQueue.main.asyncAfter(deadline: .now() + 1.6) {UIView.animate(withDuration: 0.2, animations: {self.view.backgroundColor = .cyan})} - DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) {UIView.animate(withDuration: 0.2, animations: {self.view.backgroundColor = .magenta})} - DispatchQueue.main.asyncAfter(deadline: .now() + 2.4) {UIView.animate(withDuration: 0.2, animations: {self.view.backgroundColor = .white})} + DispatchQueue.main.asyncAfter(deadline: .now() + 0.4) {UIView.animate(withDuration: 0.3, animations: {self.view.backgroundColor = .red})} + DispatchQueue.main.asyncAfter(deadline: .now() + 0.8) {UIView.animate(withDuration: 0.3, animations: {self.view.backgroundColor = .blue})} + DispatchQueue.main.asyncAfter(deadline: .now() + 1.2) {UIView.animate(withDuration: 0.3, animations: {self.view.backgroundColor = .yellow})} + DispatchQueue.main.asyncAfter(deadline: .now() + 1.6) {UIView.animate(withDuration: 0.3, animations: {self.view.backgroundColor = .cyan})} + DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) {UIView.animate(withDuration: 0.3, animations: {self.view.backgroundColor = .magenta})} + DispatchQueue.main.asyncAfter(deadline: .now() + 2.4) {UIView.animate(withDuration: 0.3, animations: {self.view.backgroundColor = .white})} self.separator.isHidden = false + self.separator.alpha = 1.0 }