//
|
// HomeItemDetailVC.swift
|
// XQMuse
|
//
|
// Created by 无故事王国 on 2024/8/14.
|
//
|
|
import UIKit
|
import JQTools
|
|
class HomeItemDetailVC: BaseVC {
|
|
@IBOutlet weak var slider_voice: UISlider!
|
@IBOutlet weak var view_function: UIView!
|
@IBOutlet weak var btn_play: UIButton!
|
@IBOutlet weak var label_title: UILabel!
|
@IBOutlet weak var label_subtitle: UILabel!
|
@IBOutlet weak var btn_like: UIButton!
|
@IBOutlet weak var label_commentNum: UILabel!
|
|
override func viewDidLoad() {
|
super.viewDidLoad()
|
title = "心泉·疗愈"
|
}
|
|
override func viewDidAppear(_ animated: Bool) {
|
super.viewDidAppear(animated)
|
|
//如果从支付过来的,移除支付
|
navigationController!.viewControllers.removeAll { vc in
|
if vc is PaymentOrderResultVC || vc is PaymentOrderVC{
|
return true
|
}
|
return false
|
}
|
}
|
|
override func setUI() {
|
|
let 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.tintColor = .white
|
share_bitem.imageInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 15)
|
navigationItem.rightBarButtonItems = [share_bitem,collect_bitem]
|
|
|
let v1 = UIView()
|
v1.backgroundColor = UIColor(hexStr: "#B6DC90")
|
v1.bounds = CGRect(x: 0, y: 0, width: 17, height: 17)
|
v1.jq_borderWidth = 2
|
v1.jq_borderColor = .white
|
v1.jq_cornerRadius = 8.5
|
|
slider_voice.setThumbImage(v1.qmui_snapshotLayerImage(), for: .normal)
|
slider_voice.setThumbImage(v1.qmui_snapshotLayerImage(), for: .highlighted)
|
|
}
|
|
override func viewWillAppear(_ animated: Bool) {
|
super.viewWillAppear(animated)
|
(navigationItem.leftBarButtonItem?.customView as? UIButton)?.setImage(UIImage(named: "btn_back")?.withTintColor(.white), for: .normal)
|
}
|
|
@IBAction func playAction(_ sender: UIButton) {
|
|
}
|
|
@IBAction func timeAction(_ sender: UIButton) {
|
CountdownChooseListView.show()
|
}
|
|
@IBAction func commentAction(_ sender: TapBtn) {
|
let vc = CommentListVC()
|
vc.modalPresentationStyle = .custom
|
present(vc, animated: true)
|
}
|
|
@IBAction func beLikeAction(_ sender: UIButton) {
|
|
}
|
|
|
@IBAction func playWayAction(_ sender: UIButton) {
|
|
}
|
|
@IBAction func settingAction(_ sender: UIButton) {
|
PlaySettingView.show()
|
}
|
|
@objc func collectionAction(){
|
|
}
|
|
@objc func shareAction(){
|
ShareView.show()
|
}
|
|
override func viewDidLayoutSubviews() {
|
super.viewDidLayoutSubviews()
|
|
view_function.jq_gradientColor(colorArr: [UIColor.black.withAlphaComponent(0.15).cgColor,UIColor.clear.cgColor], cornerRadius: 0, startPoint: CGPoint(x: 0, y: 1), endPoint: CGPoint(x: 0, y: 0), bounds: nil, locations: nil)
|
}
|
|
|
override var preferredStatusBarStyle: UIStatusBarStyle{
|
return .lightContent
|
}
|
}
|