title: Move image by button on Xcode 8
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import UIKit
  
  class Level2ViewController: UIViewController {
  
      var image = UIImage(named: "ballon.png")
  
          
      var imageView = UIImageView(image: "ballon") //initialize properly, this is just for reference
      
      
      @IBAction func buttonPressed(_ sender: UIButton) {
      
         
          UIView.animate(withDuration: 0.1, delay: 0, options: .curveEaseInOut, animations: {
              self.imageView.frame.origin.x += 50
          }, completion: nil)
      
         
  }
      override func viewDidLoad() {
          super.viewDidLoad()
  
          // Do any additional setup after loading the view.
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
     
      
      /*
      // MARK: - Navigation
  
      // In a storyboard-based application, you will often want to do a little preparation before navigation
      override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
          // Get the new view controller using segue.destinationViewController.
          // Pass the selected object to the new view controller.
      }
      */
  
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p><img src="https://i.stack.imgur.com/POdKq.png" alt="the code "></p>
  
  <p>I'm using swift 3 Xcode 8 with a single view application. My problem is that I want to make an image move right using a button. A lot of the videos and other questions about this do not work with Xcode 8, so any suggestions would be greatly appreciated.</p>