title: Disabling and greying out a UITextField in Swift
body: <p>I have 2 <code>UITextField</code>'s which I use for logging in. I want to temporarily disable them while the network request is made and then re-enable them once the network request is received.</p>
  
  <p>I was hoping for the <code>UITextField</code> to be greyed out as well while they are disabled.</p>
  
  <p>Here is the code for one of the <code>UITextField</code>s (they are both virtually identical, if I can disable one, then I can disable the other):</p>
  
  <pre><code>self.user = UITextField()
  self.user.placeholder = "Username..."
  self.user.keyboardType = UIKeyboardType.EmailAddress
  self.user.frame = CGRectMake(20, 200, 300, 40)
  self.view.addSubview(user)
  </code></pre>
  
  <p>I was hoping later in the code I could do something like:</p>
  
  <pre><code>self.user.enabled = false
  </code></pre>
  
  <p>But this doesn't seem to have any effect. Am I doing the right thing, and will this grey the <code>UITextField</code>s out?</p>
  
  <p>Many thanks.</p>