title: Having trouble taking input from textField for measurement conversion value, get various errors
body: <p>I am trying to add a basic conversion method using if statements and two pickerViews. For example, I'm trying to convert say &quot;inches&quot; to &quot;feet&quot; or &quot;millimeters&quot; but when I try and use the textField as input in the conversion initialization I get different errors like:</p>
  <p>Something like &quot;cannot convert type String or Double to expected type BinaryInteger
  Cannot assign to property: 'self' is immutable</p>
  <p>So far I have tried the following and many more:</p>
  <pre><code>var fromInches = Measurement(value: Double(exactly: BinaryInteger(convertInput.text)), Double, unit: UnitLength.inches)
  
  var fromInches = Measurement(value: Double(convertInput.text), Double, unit: UnitLength.inches)
  </code></pre>
  <p>Full code (excluding unnecessary):</p>
  <pre><code>    import UIKit
  
  class MetricImperialConvertViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource {
  
      @IBOutlet weak var convertFrom: UIPickerView!
      @IBOutlet weak var convertTo: UIPickerView!
      
      @IBOutlet weak var convertInput: UITextField!
      @IBOutlet weak var convertOutput: UITextView!
      
      var selectedFromUnit = &quot;&quot;
      var selectedToUnit = &quot;&quot;
      
      // Convert from picker tag is #1
      var convertFromData = [&quot;Inches&quot;, &quot;Feet&quot;, &quot;Millimeters&quot;, &quot;Centimeters&quot;, &quot;Meters&quot;]
      //Convert to picker tag is #2
      var convertToData = [&quot;Inches&quot;, &quot;Feet&quot;, &quot;Millimeters&quot;, &quot;Centimeters&quot;, &quot;Meters&quot;]
      ...
  
          func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
          if pickerView.tag == 1 {
          selectedFromUnit = convertFromData[row]
          } else if pickerView.tag == 2 {
          selectedToUnit = convertToData[row]
          }
          
          print(&quot;Convert from: \(selectedFromUnit)\n to: \(selectedToUnit)&quot;)
          
          // Convert inches to feet
          if selectedFromUnit == &quot;inches&quot; &amp;&amp; selectedToUnit == &quot;feet&quot; {
              var fromInches = Measurement(value: Double(convertInput.text), Double, unit: UnitLength.inches)
              convertOutput.text = fromInches.converted(to: UnitLength.feet)
              
          }
          
      }
  </code></pre>
  <p>This thing is driving me nuts, I'm way too new at code to deal with ultra complexity. Please help :)</p>