UIView's shadowpath color doesn't change
问题 I have a UIView and I set a shadowPath for it like this: func addShadow() { let cornerRadius: CGFloat = self.containerView.frame.height/2 self.containerView.layer.shadowPath = UIBezierPath(roundedRect: self.containerView.frame, cornerRadius: cornerRadius).cgPath self.containerView.layer.shadowRadius = cornerRadius self.containerView.layer.shadowOffset = .zero self.containerView.layer.shadowOpacity = 0.2 self.containerView.layer.cornerRadius = cornerRadius self.containerView.layer.shadowColor