title: How to add UIView on window in app delegate in swift?
body: <p><strong>view object is not getting in addsubview bracket</strong> </p>
  
  <pre><code>func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -&gt; Bool
      {
              // Override point for customization after application launch.
              UIApplication.sharedApplication().setStatusBarHidden(true, animated: true);
              var myView = UIView(frame:CGRectMake(0, 200, 320, 100));
              myView.backgroundColor = UIColor.redColor()
              self.window.?.addSubview(myView)
  
  
              return true
      }
  </code></pre>