У меня есть UIView
с CAGradientLayer
, но ярлыки в UIView
не появляются, когда я запускаю приложение.
@IBOutlet weak var CardView: UIView!
@IBOutlet weak var CardTiltle: UILabel!
@IBOutlet weak var CardInfo: UILabel!
func prepareCardViewUI() {
let GradientLayer = CAGradientLayer()
GradientLayer.frame = CardView.bounds
GradientLayer.colors = [UIColor(red: 254/255, green: 164/255, blue: 156/255, alpha: 1).cgColor, UIColor(red: 252/255, green: 207/255, blue: 170/255, alpha: 1).cgColor]
GradientLayer.startPoint = CGPoint(x: 1.0, y: 0.0)
GradientLayer.endPoint = CGPoint(x: 0, y: 1.0)
GradientLayer.cornerRadius = 25
CardView.layer.addSublayer(GradientLayer)
CardView.layer.cornerRadius = 25
}