title: Value of optional type CGFloat not unwrapped error in Swift
body: <p>Code:</p>
  
  <pre><code>var loadView = UIView(frame: CGRectMake(0, 0, self.window?.frame.size.width, self.window?.frame.size.height))
  </code></pre>
  
  <p>I try to create a UIView progrmatically.when try to set window height and width for view it gives error as "Value of optional type 'CGFloat?' not unwrapped; did you mean to use '!' or '?'?"
  why this error showing?any help will be appreciated.thanks in advance</p>