Apply gradient on a UIView not working
问题 I am trying to add gradient to a UIView programmatically but it is not working. It just appears to have no color at all. I have attached the relevant code as well as a screenshot. Notice the bottom square over which i am applying the gradient. Can someone help me figure out what I'm doing wrong here? let sundayView = UIView() override func viewDidLoad() { super.viewDidLoad() setupViews() setupSundayView() } func setupViews() { sundayView.translatesAutoresizingMaskIntoConstraints = false view