title: unexpectedly found nil while unwrapping an Optional value, when trying to cover toInt()
body: <p>I am new in Swift and I am trying to build a simple program that converts the number of week in days, minutes and seconds, but i just cannot convert <code>String</code> to <code>Int</code>. When I thought it was done using <code>toInt()</code>, a message appeared in this line: </p>
  
  <p><code>var tempoEmDias:Int! = timeInDays.text.toInt()</code>, </p>
  
  <pre><code>fatal error: unexpectedly found nil while unwrapping an Optional value...
  </code></pre>
  
  <p>Does anybody can help me? Code below...</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController {
  
  @IBOutlet var timeInDays: UITextField!
  
  @IBOutlet var numberOfWeeks: UILabel!
  
  
  @IBOutlet var numberOfHours: UILabel!
  
  
  @IBOutlet var numberOfMinutes: UILabel!
  
  
  @IBOutlet var numberOfSeconds: UILabel!
  
  
  @IBAction func calculaTempo(sender: AnyObject) {
  
    // BELOW: fatal error: unexpectedly found nil while unwrapping an Optional value. 
      var tempoEmDias:Int! = timeInDays.text.toInt()
  
  
  
      // calcula semana
  
      var numeroDeSemanas:Int = 0
  
  
      if tempoEmDias! &lt;= 7 {
          numeroDeSemanas = 1
      } else {
  
      numeroDeSemanas = tempoEmDias! / 7
  
      }
  
      let numeroDeSemanasCerto:Int = Int(numeroDeSemanas)
  
      numberOfWeeks.text = "/(numeroDeSemanasCerto) semanas"
  
      // calcula horas
  
      let numeroDeHoras = numeroDeSemanasCerto * 24
      numberOfHours.text = "/(numeroDeHoras) horas"
  
      // calcula minutos
  
      let numeroDeMinutos = numeroDeHoras * 60
      numberOfMinutes.text = "/(numeroDeMinutos) minutos"
  
      // calcula segundos
  
      let numeroDeSegundos = numeroDeMinutos * 60
      numberOfSeconds.text = "/(numeroDeSegundos) segundos"
  
  }
  </code></pre>