change color view swift code example Example: swift change background color self.view.backgroundColor = UIColor.red