From ecadd850898561de15293db96f1fc48bcc705be7 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Thu, 20 Aug 2015 14:46:11 +0800 Subject: [PATCH] images layout for ShowStepMatchViewController --- Yep/Show.storyboard | 48 ++++++++++++++++--- .../Show/ShowViewController.swift | 14 +++++- 2 files changed, 54 insertions(+), 8 deletions(-) diff --git a/Yep/Show.storyboard b/Yep/Show.storyboard index 190157ba..68858dd4 100644 --- a/Yep/Show.storyboard +++ b/Yep/Show.storyboard @@ -219,22 +219,51 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -242,7 +271,7 @@ - + @@ -256,7 +285,11 @@ + + + + @@ -268,5 +301,6 @@ + diff --git a/Yep/ViewControllers/Show/ShowViewController.swift b/Yep/ViewControllers/Show/ShowViewController.swift index a1524acd..e5b890b1 100644 --- a/Yep/ViewControllers/Show/ShowViewController.swift +++ b/Yep/ViewControllers/Show/ShowViewController.swift @@ -27,7 +27,7 @@ class ShowViewController: UIViewController { func makeUI() { let stepA = stepGenius() - let stepB = step("Yep Intro") + let stepB = stepMatch() let stepC = step("Yep Intro") steps = [stepA, stepB, stepC] @@ -67,6 +67,18 @@ class ShowViewController: UIViewController { return step } + private func stepMatch() -> ShowStepMatchViewController { + let step = storyboard!.instantiateViewControllerWithIdentifier("ShowStepMatchViewController") as! ShowStepMatchViewController + + step.view.setTranslatesAutoresizingMaskIntoConstraints(false) + scrollView.addSubview(step.view) + + addChildViewController(step) + step.didMoveToParentViewController(self) + + return step + } + private func step(name: String) -> ShowStepViewController { let step = storyboard!.instantiateViewControllerWithIdentifier("ShowStepViewController") as! ShowStepViewController