title: Appearing and Disappearing UIButton
body: <p>I'm new to Objective C and swift (I guess we are all new to swift) but I am trying to make a UIButton appear and disappear in different locations on the screen in my app. This is what I've tried in one of my view controllers so far but it doesn't seem to work.</p>
  
  <pre><code>func addButton() {
    var start: CFTimeInterval
    var elapsedTime:CFTimeInterval
    let Button = UIButton()
    let picture = UIImage(named: "picture.png")
    Button.setImage(picture, forState: UIControlState.Normal)
    Button.frame = CGRectMake(0, 142, 106.6, 106.5)
    self.view!.addSubview(Button)
    while (elapsedTime &lt; 1.0) {
        elapsedTime = CACurrentMediaTime() - start
    }
    Button.removeFromSuperView()
  }
  </code></pre>