title: UIView in Playground
body: <p>I have defined two views differently like-</p>
  
  <p><strong>First method:</strong></p>
  
  <pre><code>let containerView = UIView(frame: CGRect(x: 0.0, y: 0.0, width: 375.0, height: 667.0))
  containerView.backgroundColor = UIColor.redColor()
  </code></pre>
  
  <p>I can see the rectangle.</p>
  
  <p><strong>Second method:</strong></p>
  
  <pre><code>let view = UIView()
  view.frame = CGRect(x: 0, y: 0, width: 200, height: 200)
  view.backgroundColor = UIColor.blueColor()
  </code></pre>
  
  <p>I see some log message like output.</p>
  
  <p>Why both are giving different outputs?</p>
  
  <p>Some tutorials in the web used first method and some the second one.</p>
  
  <p>Here's the picture.</p>
  
  <p><a href="https://i.stack.imgur.com/d65Ye.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d65Ye.png" alt="enter image description here"></a></p>