From 098286ed0313b1d3f1141113b371f8b17b8b26b5 Mon Sep 17 00:00:00 2001 From: 杨锴 <841720330@qq.com> Date: 星期五, 25 十月 2024 21:13:03 +0800 Subject: [PATCH] fix API --- XQMuse/Root/Course/VC/CourseDetialVC.swift | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/XQMuse/Root/Course/VC/CourseDetialVC.swift b/XQMuse/Root/Course/VC/CourseDetialVC.swift index 0912a2e..a487dc1 100644 --- a/XQMuse/Root/Course/VC/CourseDetialVC.swift +++ b/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] } -- Gitblit v1.7.1