我已創建CAGradientLayer的子類,其中colors,startPoint和endPoint的期望值。它看起來像這樣: public final class GradientBackgroundLayer: CAGradientLayer {
// MARK: - Properties
private let leftColor = UIColor(red: 0.
我想在我的應用程序中使用CAGradientLayer。 class ViewController: UIViewController {
var label: UILabel!
override func viewDidLoad() {
let width = view.frame.size.width
let height = view.frame.size.heig