杨锴
2024-10-25 098286ed0313b1d3f1141113b371f8b17b8b26b5
XQMuse/Root/Course/VC/CourseDetialVC.swift
@@ -21,6 +21,7 @@
            private var tableView:UITableView?
    private var collect_bitem:UIBarButtonItem!
    private var share_bitem:UIBarButtonItem!
            private let studyBtn = QMUIButton(type: .custom)
            private var headerView = CourseDetailHeaderView.jq_loadNibView()
            private var barStyle:UIStatusBarStyle = .lightContent
@@ -121,7 +122,7 @@
        collect_bitem = UIBarButtonItem(image: UIImage(named: "btn_collect"), style: .plain, target: self, action: #selector(collectionAction))
        collect_bitem.tintColor = .white
        let share_bitem = UIBarButtonItem(image: UIImage(named: "btn_share"), style: .plain, target: self, action: #selector(shareAction))
        share_bitem = UIBarButtonItem(image: UIImage(named: "btn_share"), style: .plain, target: self, action: #selector(shareAction))
        share_bitem.tintColor = .white
        share_bitem.imageInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 15)
        navigationItem.rightBarButtonItems = [share_bitem,collect_bitem]
@@ -349,10 +350,21 @@
                        if v > 0{
                                    (navigationItem.leftBarButtonItem?.customView as? UIButton)?.setImage(UIImage(named: "btn_back")?.withTintColor(.black.withAlphaComponent(v)), for: .normal)
            (navigationItem.rightBarButtonItem?.customView as? UIButton)?.setImage(UIImage(named: "btn_back")?.withTintColor(.black.withAlphaComponent(v)), for: .normal)
            collect_bitem.tintColor = .black
            share_bitem.tintColor = .black
                                    self.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor:Def_NavFontColor.withAlphaComponent(v),.font:Def_NavFont]
                                    barStyle = .darkContent
                        }else{
            collect_bitem.tintColor = .white
            share_bitem.tintColor = .white
                                    (navigationItem.leftBarButtonItem?.customView as? UIButton)?.setImage(UIImage(named: "btn_back")?.withTintColor(.white), for: .normal)
                                    self.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor:UIColor.white,.font:Def_NavFont]
                        }