title: How to move a UIView programmatically in Swift
body: <p>The issue is to move an "InfoView" (UIView) programmatically in Swift.</p>
  
  <p>The following constraints exist in the storyboard (see image):</p>
  
  <p><img src="https://i.stack.imgur.com/sMIer.png" alt="enter image description here"></p>
  
  <p>Now, I would like to move the "InfoView" inside "MyView" up or down.</p>
  
  <p>I tried:</p>
  
  <pre><code>@IBOutlet weak var infoTextLabel: UILabel!
  @IBOutlet weak var infoTextLabelView: UIView!
  
  // set infoTextLabel color
  self.infoTextLabel.textColor = UIColor.blackColor()
  // set infoTextLabel text
  self.infoTextLabel.text = "hello"
  // unhide infoTextLabel
  self.infoTextLabel.hidden = false
  
  // For the moving in Y-direction, I tried this - but does not work !!!!!!!
  self.infoTextLabelView.frame.origin.y += 200
  </code></pre>
  
  <p>Could the Autolayout-constraints play a role. How to overcome those programmatically. Or is the frame.origin.y method the wrong one ??</p>
  
  <p>Appreciate any help on this !</p>