title: Swift : Hide button in subview
body: <p>I am trying to hide a UIButton in a subView when a function is fired.
  I have multiple views with that hierarchy :</p>
  
  <pre><code>  var takePhotoButton : UIButton = UIButton.buttonWithType(UIButtonType.System) as UIButton
  
          takePhotoButton.addTarget(self, action:"takePhoto", forControlEvents:UIControlEvents.TouchUpInside)
  
  
          var savePhotoButton : UIButton = UIButton.buttonWithType(UIButtonType.System) as UIButton
  
  
          let view2:UIView = UIView(frame: CGRectMake(0, 0, 320, 568))
  
  
          self.view.addSubview(photoMask)
          photoMask.addSubview(view2)
          view2.addSubview(takePhotoButton)
  </code></pre>
  
  <p>I want to hide the takePhotoButton when the following func is fired, how could I do that ?</p>
  
  <pre><code>     func takePhoto(takePhotoButton: UIButton!) {
     takePhotoButton.hidden = true
     }
  </code></pre>