title: UIView cannot be unhidden
body: <p>I currently have a <code>UIActivityIndicatorView</code> and <code>UILabel</code> in a <code>UIView</code> which are all hidden by default:</p>
  
  <p><a href="https://i.stack.imgur.com/GQeaU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GQeaU.png" alt="UIView"></a></p>
  
  <p>All 3 elements should be unhidden after the Login button is tapped:</p>
  
  <pre><code>@IBAction func signinTapped(sender: UIButton) {
      loading.hidden = false
      activityIndicatorView.startAnimating()
  </code></pre>
  
  <p>All 3 elements should be hidden again after it has received a response from the server:</p>
  
  <pre><code>                    if(success == 1)
                      {
                          NSLog("Login SUCCESS");
  
                          let prefs:NSUserDefaults = NSUserDefaults.standardUserDefaults()
                          prefs.setObject(username, forKey: "USERNAME")
                          prefs.setInteger(1, forKey: "ISLOGGEDIN")
                          prefs.synchronize()
  
                          loading.hidden = true
                          activityIndicatorView.stopAnimating()
  
                          self.performSegueWithIdentifier("goto_attendance", sender: self)
                      }
  </code></pre>
  
  <p>However, the elements are <strong>not unhidden</strong> after Login button is tapped.</p>
  
  <p>I have tried to test it by creating a button just to hide and unhide the elements, and it works. Thus, all the outlets and variable names are correct.</p>
  
  <p>It just wouldn't hide and unhide when there are other functions before it such as setting the <code>prefs:NSUserDefaults</code> as shown in my above code.</p>