         Debug.print(response.result.value)
         let json = try JSON(data: data)
         let categories = try json.array("data").map(Category.init)
-        self?.navigationController?.setViewControllers([CategoriesViewController(categories: categories)], animated: true)
+        let showCategories: () -> Void = {
+          self?.navigationController?.setViewControllers([CategoriesViewController(categories: categories)], animated: true)
+        }
+
+        if let this = self where this.isAnimating {
+          // Wait until the animation finishes
+          dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
+            dispatch_semaphore_wait(this.semaphore, Animation.duration.dispatchTime)
+            dispatch_async(dispatch_get_main_queue(), showCategories)
+          }
+        } else {
+          showCategories()
+        }
       } catch {
         self?.showAlert(error, retry: self?.fetchCategories)
       }

  override func viewDidAppear(animated: Bool) {
    super.viewDidAppear(animated)

    UIView.animateKeyframesWithDuration(0.9, delay: 0, options: [],
                                        animations: {
      UIView.addKeyframeWithRelativeStartTime(0, relativeDuration: 0.6) {
        self.upperTaglineLabel.alpha = 1
        self.upperTaglineConstraint?.constant = 40
        self.view.layoutIfNeeded()
      }
      UIView.addKeyframeWithRelativeStartTime(0.2, relativeDuration: 0.7) {
        self.lowerTaglineLabel.alpha = 1
        self.lowerTaglineConstraint?.constant = 0
        self.view.layoutIfNeeded()
      }
    }, completion: nil)
  }

  // MARK: - Private Methods

  }

}


private extension NSTimeInterval {

  var dispatchTime: dispatch_time_t {
    return dispatch_time(DISPATCH_TIME_NOW, Int64(self * 1e+9))
  }

}
