title: swift showing a hidden container view
body: <p>I have a container view like this:</p>
  
  <p><img src="https://i.stack.imgur.com/5p40h.png" alt="enter image description here"></p>
  
  <p>The main is called ConfigViewContainer and the child is called ConfigDistrictViewController which has a UIPicker on it.
  If I dont set in the storyboard ConfigDistrictViewController as hidden then it shows. </p>
  
  <p><img src="https://i.stack.imgur.com/wFtlG.png" alt="enter image description here"></p>
  
  <p>Now I want to show it via code when i do a touchdown event in the ConfigViewController textfield control.</p>
  
  <pre><code>var configDistrictViewController: ConfigDistrictViewController?
  var uiView : UIView?
  
  @IBAction func selectDistrictTouchDown(sender: AnyObject) {
      self.performSegueWithIdentifier("ConfigDistrictSelectionSegue", sender: self)
  
  }
  
  
  override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
  
      if(segue.identifier == "ConfigDistrictViewController")
      {
          configDistrictViewController = segue.destinationViewController as? ConfigDistrictViewController
  
          configDistrictViewController?.showContainer()
  
          // Also tried the following      
          uiView = configDistrictViewController?.view
          uiView?.hidden = false
  
  
      }
  }
  </code></pre>
  
  <p>Here is the code in the ConfigDistrictViewController:</p>
  
  <pre><code>func showContainer()
  {
      println("showContainer")
      self.view.hidden = true
  }
  </code></pre>
  
  <p>but all i get is error like this:</p>
  
  <p><img src="https://i.stack.imgur.com/tSTKX.png" alt="enter image description here"></p>
  
  <p>The failure happens here:</p>
  
  <pre><code>        configDistrictViewController = segue.destinationViewController as? ConfigDistrictViewController
  </code></pre>
  
  <p>so I'm thinking I may be using:</p>
  
  <pre><code>self.performSegueWithIdentifier("ConfigDistrictSelectionSegue", sender: self)
  </code></pre>
  
  <p>incorrectly</p>