title: Convert UITextField to Integer in Xcode 8 and Swift 3 and calculate with them
body: <p>I searched the whole internet but only found solutions for Swift 2 or outdated Xcode versions which doesnt help me :/
  Also Im very new to Xcode and Swift, so please excuse that.</p>
  
  <p>I want the user to input some numbers in several UITextFields and then press a "calculate" button which shows the result in a UILabel.</p>
  
  <p>What I tested so far:</p>
  
  <p><a href="https://stackoverflow.com/questions/36786504/convert-input-data-to-integer-in-swift">Convert input data to Integer in Swift</a></p>
  
  <p><a href="https://stackoverflow.com/questions/25589013/swift-calculate-value-of-uitextfields-and-return-value">Swift calculate value of UITextFields and return value</a></p>
  
  <p>So my code looks really poor so far. Nothing worked so thats all I have and the comment shows how I want it to be:</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController {
  
      //elements from the viewcontroller
      @IBOutlet weak var input1: UITextField!
      @IBOutlet weak var input2: UITextField!
      @IBOutlet weak var calculate: UIButton!
      @IBOutlet weak var output: UILabel!
  
      //calculation
      //Just simple math like
      //output = input1 + input2
      //or output = (input1 + 50) + input2
  
  
  
  
  
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view, typically from a nib.
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  
  
  }
  </code></pre>
  
  <p>Thank you for helping me out =)</p>