Commit 8bbf316e6ff4d8f9a281740acccfc697058a3fe8

Authored by 左丞
1 parent 9fdd262d
Exists in newLive

no message

YouerLiveVideo/YouerLiveVideo/controllers/Resource/ResourceViewController.swift
@@ -165,7 +165,9 @@ class ResourceViewController: UIViewController,UITableViewDelegate,UITableViewDa @@ -165,7 +165,9 @@ class ResourceViewController: UIViewController,UITableViewDelegate,UITableViewDa
165 let vc = UIStoryboard(name: "HomePage", bundle: nil).instantiateViewController(withIdentifier: "RankingTableViewController") as! RankingTableViewController 165 let vc = UIStoryboard(name: "HomePage", bundle: nil).instantiateViewController(withIdentifier: "RankingTableViewController") as! RankingTableViewController
166 self.navigationController?.pushViewController(vc, animated: true) 166 self.navigationController?.pushViewController(vc, animated: true)
167 }else{ 167 }else{
168 - 168 + let download = DownLoad.share
  169 + download.superVC = self
  170 + download.downLoadWithUrl(url: resourceData[indexPath.row].f_ResourceUrl)
169 } 171 }
170 } 172 }
171 //取消键盘输入状态 173 //取消键盘输入状态
YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift
@@ -15,6 +15,7 @@ class TVStationViewController: UIViewController { @@ -15,6 +15,7 @@ class TVStationViewController: UIViewController {
15 var excellentTVStationProgram:[TVStationSubject] = [] 15 var excellentTVStationProgram:[TVStationSubject] = []
16 @IBOutlet weak var tableView: UITableView! 16 @IBOutlet weak var tableView: UITableView!
17 var TVStationType:[String] = ["十佳电视台","优秀电视台","优秀校园节目"] 17 var TVStationType:[String] = ["十佳电视台","优秀电视台","优秀校园节目"]
  18 + var TVicon:[String] = ["icon_ranking","icon_hotcourse","icon_tvstation"]
18 override func viewDidLoad() { 19 override func viewDidLoad() {
19 super.viewDidLoad() 20 super.viewDidLoad()
20 self.configTheme() 21 self.configTheme()
@@ -116,14 +117,14 @@ extension TVStationViewController:UITableViewDelegate,UITableViewDataSource{ @@ -116,14 +117,14 @@ extension TVStationViewController:UITableViewDelegate,UITableViewDataSource{
116 func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { 117 func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
117 let view = UIView(frame: CGRect(x: 0, y: 0, width: getScreenWidth(), height: 44)) 118 let view = UIView(frame: CGRect(x: 0, y: 0, width: getScreenWidth(), height: 44))
118 view.backgroundColor = tableView.backgroundColor 119 view.backgroundColor = tableView.backgroundColor
119 - let imageView = UIImageView(frame: CGRect(x: 8, y: 8, width: 28, height: 28))  
120 - imageView.image = UIImage(named: "icon")  
121 - let label = UILabel(frame: CGRect(x: imageView.frame.maxX+8, y: 11, width: 100, height: 21)) 120 + let imageView = UIImageView(frame: CGRect(x: 8, y: 11, width: 20, height: 20))
  121 + imageView.image = UIImage(named: TVicon[section])
  122 + let label = UILabel(frame: CGRect(x: imageView.frame.maxX+16, y: 11, width: 100, height: 21))
122 label.text = TVStationType[section] 123 label.text = TVStationType[section]
123 label.textAlignment = .left 124 label.textAlignment = .left
124 label.sizeToFit() 125 label.sizeToFit()
125 let btn = UIButton(frame: CGRect(x: getScreenWidth() - 8 - 30, y: 7, width: 30, height: 30)) 126 let btn = UIButton(frame: CGRect(x: getScreenWidth() - 8 - 30, y: 7, width: 30, height: 30))
126 - btn.setImage(UIImage(named:"moreHot"), for: .normal) 127 + btn.setImage(#imageLiteral(resourceName: "arrow.png"), for: .normal)
127 btn.tag = section 128 btn.tag = section
128 btn.addTarget(self, action: #selector(TVStationViewController.moreBtnClick(sender:)), for: .touchUpInside) 129 btn.addTarget(self, action: #selector(TVStationViewController.moreBtnClick(sender:)), for: .touchUpInside)
129 view.addSubview(btn) 130 view.addSubview(btn)
@@ -192,6 +193,10 @@ extension TVStationViewController:UICollectionViewDelegate,UICollectionViewDeleg @@ -192,6 +193,10 @@ extension TVStationViewController:UICollectionViewDelegate,UICollectionViewDeleg
192 } 193 }
193 } 194 }
194 195
  196 + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
  197 + return UIEdgeInsetsMake(0, 10, 0, 10)
  198 + }
  199 +
195 } 200 }
196 201
197 class TVStationViewControllerTableViewCell:UITableViewCell{ 202 class TVStationViewControllerTableViewCell:UITableViewCell{
YouerLiveVideo/YouerLiveVideo/util/DownLoad.swift
@@ -38,7 +38,9 @@ class DownLoad :NSObject,QLPreviewControllerDataSource { @@ -38,7 +38,9 @@ class DownLoad :NSObject,QLPreviewControllerDataSource {
38 } 38 }
39 } 39 }
40 func openIt(name:String){ 40 func openIt(name:String){
  41 +
41 let ql = QLPreviewController() 42 let ql = QLPreviewController()
  43 + ql.hidesBottomBarWhenPushed = true
42 ql.dataSource = self 44 ql.dataSource = self
43 pathName=name 45 pathName=name
44 if self.superVC.navigationController == nil{ 46 if self.superVC.navigationController == nil{