//
//  UIViewController+Ex.swift
//  KittensTravelNotes
//
//  Created by 100Years on 2025/7/6.
//

extension UIViewController{
    
    func addGradientColorTop(colors:[CGColor] = [UIColor.themeColor.cgColor,UIColor.themeColor.withAlphaComponent(0.0).cgColor],height:CGFloat = 155.0,alpha:CGFloat = 0.2) {
        let topView = UIView(frame: CGRectMake(0, 0, k_ScreenWidth, height))
        topView.addGradientBg(colors: colors,startPoint: CGPoint(x: 0.5, y: 0),endPoint: CGPoint(x: 0.5, y: 1))
        topView.alpha = alpha
        view.insertSubview(topView, at: 0)
    }
}
