title: Swift extract an Int, Float or Double value from a String (type-conversion)
body: <p>Please could you help me here? I need to understand how to convert a String into an Int, Float or Double! This problem occurs when I'm trying to get the value from an UITextField and need this type of conversion!</p>
  
  <p>I used to do it like this:</p>
  
  <pre><code>var myValue : Float = myTextField.text.bridgeToObjectiveC().floatValue
  </code></pre>
  
  <p>but since Xcode 6 beta 6 it doesn't seem to work anymore! </p>
  
  <p>I've tried also like this:</p>
  
  <pre><code>var str = "3.14"
  
  // Conversion from StringValue to an Int
  var intValue : Int = str.toInt()!
  
  // Other converstion from StringValue to an Int
  var intOtherValue : Int = Int(str)
  
  // Converstion from StringValue to a Float
  var floatValue : Float = str.bridgeToObjectiveC().floatValue
  
  // Converstion from StringValue to a Double
  var doubleValue : Double = Double(str)
  </code></pre>
  
  <p>Please help me or tell me where I can find the answer! Many thanks!</p>