swift 5 background color cgcolor code example
Example 1: swift change background color
self.view.backgroundColor = UIColor.red
Example 2: changing color of background swift
self.view.backgroundColor = UIColor.blue // or .blue for shorthand
self.view.backgroundColor = UIColor.red
self.view.backgroundColor = UIColor.blue // or .blue for shorthand