How can I set a background image for my main view controller in Xcode 6 using swift? I know that you can do this in the assistant editor as below:
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = UIColor.yellowColor()
}
What is the code to set the background to an image I have in my assets folder?
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = UIColor(patternImage: UIImage(named: "background.png"))
}