title: Change Background Color of ViewController Swift? (Single View Application)
body: <p>I am making a very simple single view application in Swift (XCode 6.2) that comprises of 2 buttons &quot;blackButton&quot; and &quot;whiteButton&quot;. Upon clicking blackButton it changes the View's background color to Black and upon clicking the whiteButton it changes the background to white. Can anyone suggest any possible ways to do this?</p>
  <h3>ViewController.swift:</h3>
  <pre><code>//beginning
  import UIKit
  
  class ViewController: UIViewController {
  
      @IBAction func blackButton(sender: AnyObject) {
      }
      @IBAction func whiteButton(sender: AnyObject) {
      }
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view, typically from a nib.
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  
  
  }
  </code></pre>