From a5d5ad1b4492bbc158d7f5e75d314327f25058be Mon Sep 17 00:00:00 2001 From: Adam Sliwakowski Date: Sat, 23 Apr 2016 13:12:26 +0200 Subject: [PATCH] Fixed in presenting waiting VC --- Succotash/Succotash/Storyboard/Questions.storyboard | 2 +- .../ViewController/QuestionsViewController.swift | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Succotash/Succotash/Storyboard/Questions.storyboard b/Succotash/Succotash/Storyboard/Questions.storyboard index c7e86b8..66ed7f1 100644 --- a/Succotash/Succotash/Storyboard/Questions.storyboard +++ b/Succotash/Succotash/Storyboard/Questions.storyboard @@ -1,5 +1,5 @@ - + diff --git a/Succotash/Succotash/ViewController/QuestionsViewController.swift b/Succotash/Succotash/ViewController/QuestionsViewController.swift index 7b1d21a..1e0cf29 100644 --- a/Succotash/Succotash/ViewController/QuestionsViewController.swift +++ b/Succotash/Succotash/ViewController/QuestionsViewController.swift @@ -115,9 +115,8 @@ extension QuestionsViewController { extension QuestionsViewController { private func presentWaitingViewController() { let waitingVC = storyboard?.instantiateViewControllerWithIdentifier("WaitingViewController") as! WaitingViewController - presentViewController(waitingVC, animated: true) { [unowned self] in - self.configureWaitingVC(waitingVC) - } + configureWaitingVC(waitingVC) + presentViewController(waitingVC, animated: true, completion: nil) } private func configureWaitingVC(vc: WaitingViewController) { @@ -130,9 +129,8 @@ extension QuestionsViewController { timer?.invalidate() timer = nil let waitingVC = storyboard?.instantiateViewControllerWithIdentifier("WaitingViewController") as! WaitingViewController - presentViewController(waitingVC, animated: true) { - waitingVC.configureWithoutTimer() - } + waitingVC.configureWithoutTimer() + presentViewController(waitingVC, animated: true, completion: nil) } }