convert TextField to Var Int (swift) : <p>Hi Im new to swift programming. I would like to get the input of a textfield, convert it to an int and then work with that int (decreasing it). Here is my code:</p>

<pre><code> @IBOutlet weak var minutes: UITextField!

 @IBOutlet weak var seconds: UITextField!

@IBOutlet weak var label_Timer: UILabel!

@IBAction func btn_Timer(_ sender: UITextField) {

    var min:Int = Int(minutes.text!)
    var sec:Int = Int(seconds.text!)

    timer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(ViewController.timerRunning), userInfo: nil, repeats: true)

}

func timerRunning(){

    sec -= 1

//operate on min and sec here

}
</code></pre>
