title: Swift Pass in Properties on Older iOS versions
body: <p>As an example say I have the following code that takes in a string and a UITextContentType.</p>
  
  <pre><code>var items: [Item] = [
      TextField.init(
          title: "First Name", 
          textContentType: UITextContentType.givenName
      ),
  ]
  </code></pre>
  
  <p>But my application targets versions before iOS 10 where UITextContentType was implemented. What is the best way to deal with this?</p>
  
  <p>Xcode fix-it wants me to <code>@available</code> to the enclosing var or class. But that would mean that on previous versions my application would crash.</p>
  
  <p>Also here is my code where I set textContentType.</p>
  
  <pre><code>if #available(iOS 10.0, *) {
      textField.textContentType = textContentType
  }
  </code></pre>
  
  <p>So basically I want to say if it's not on iOS pass nothing in, or nil or something along those lines.</p>
  
  <p>How can I achieve this while still writing code that doesn't repeat a ton and in the cleanest way possible?</p>