The navigation bar has a .isTranslucent
property that gives it that gray background color
navigationController?.navigationBar.isTranslucent = true
I want my entire view controller to match that same exact color and .lightGray
isn't it. I tried playing with the view controller's view's .alpha
and .isOpaque
properties but I cannot get it to match.
Does anyone know the rgb colors or another way I can get my view controller's view's background color to match that same translucent gray color?
override func viewDidLoad() {
super.viewDidLoad()
// I tried playing with different combinations of all of these in different ways
view.backgroundColor = .lightGray
view.alpha = .5
view.isOpaque = false
}