title: Change viewController BG color based off another view controller
body: <p>So I need some help for a project. I have a simple tab bar SVC where the first view is a timer and the second is a settings page. On the settings page I've setup a struct with an array of colors, then when a user clicks a button a random color in the array is called and applied to the back ground. This part works just as I Intended. What I'd like to do is then apply that color to the background of the second view. </p>
  
  <p>Here is the settings code</p>
  
  <pre><code>import UIKit
  import GameKit
  
  public var randomColor = UIColor()
  
  class SettingsViewController: UIViewController {
  
  
  @IBOutlet weak var pushMe: UIButton!
  let colorProvider = BackgroundColorProvider()
  
  @IBAction func pushMeChange(_ sender: Any) {
  randomColor = colorProvider.randomColorBG()
  print (randomColor.superclass as Any)
  view.backgroundColor = randomColor
  }
  
  struct BackgroundColorProvider {
  let colors = [
      UIColor(red: 90/255.0, green: 187/255.0, blue: 181/255.0, alpha: 1.0), // teal color
      UIColor(red: 222/255.0, green: 171/255.0, blue: 66/255.0, alpha: 1.0), // yellow color
      UIColor(red: 223/255.0, green: 86/255.0, blue: 94/255.0, alpha: 1.0), // red color
      UIColor(red: 239/255.0, green: 130/255.0, blue: 100/255.0, alpha: 1.0), // orange color
      UIColor(red: 77/255.0, green: 75/255.0, blue: 82/255.0, alpha: 1.0), // dark color
      UIColor(red: 105/255.0, green: 94/255.0, blue: 133/255.0, alpha: 1.0), // purple color
      UIColor(red: 85/255.0, green: 176/255.0, blue: 112/255.0, alpha: 1.0), // green color
  ]
  
  func randomColorBG() -&gt; UIColor {
  let randomNumber = GKRandomSource.sharedRandom().nextInt(upperBound: colors.count)
  return colors[randomNumber]
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Then I have this in the main viewController I pulled from here:
  <a href="https://stackoverflow.com/questions/27093226/changing-background-color-of-all-views-in-project-from-one-view-controller">Changing background color of all views in project from one view controller?</a></p>
  
  <p>The function does error below doesn't error out however I'm a noob at best, I'm not sure how the bell should work and i doubt its even being called. Any help is appreciated.</p>
  
  <pre><code>// bringing in background color from SettingsViewController
  
   func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
      if (segue.identifier == "Load View") {
          // pass data to next view
          let viewController:SettingsViewController = segue!.destination as!  SettingsViewController
          viewController.view.backgroundColor = self.view.backgroundColor
      }
  }
  </code></pre>