title: Calling a Swift class factory method with leading dot notation?
body: <p>In a recent question, the poster had this interesting line of code:</p>
  
  <pre><code>self.view.backgroundColor = .whiteColor()
  </code></pre>
  
  <p>I was surprised to see this.  I've only ever seen the <em>leading dot</em> notation used for enum values.  In this case, <code>backgroundColor</code> is of type <code>UIColor?</code> and <code>whiteColor</code> is a class method on <code>UIColor</code> that returns a <code>UIColor</code>.</p>
  
  <p>Why does this work?  It this a legitimate way to call a factory method?</p>