changing color of background swift code example Example: changing color of background swift self.view.backgroundColor = UIColor.blue // or .blue for shorthand