use variable background color swift code example
Example 1: swift change background color
self.view.backgroundColor = UIColor.red
Example 2: how to change background color swift
self.view.backgroundColor = .black / .blue / .purple / .clear /ect.