From 8bbf316e6ff4d8f9a281740acccfc697058a3fe8 Mon Sep 17 00:00:00 2001 From: 左丞 Date: Thu, 25 May 2017 08:52:34 +0800 Subject: [PATCH] no message --- YouerLiveVideo/YouerLiveVideo/controllers/Resource/ResourceViewController.swift | 4 +++- YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift | 13 +++++++++---- YouerLiveVideo/YouerLiveVideo/util/DownLoad.swift | 2 ++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/YouerLiveVideo/YouerLiveVideo/controllers/Resource/ResourceViewController.swift b/YouerLiveVideo/YouerLiveVideo/controllers/Resource/ResourceViewController.swift index f304f4b..32d79bd 100644 --- a/YouerLiveVideo/YouerLiveVideo/controllers/Resource/ResourceViewController.swift +++ b/YouerLiveVideo/YouerLiveVideo/controllers/Resource/ResourceViewController.swift @@ -165,7 +165,9 @@ class ResourceViewController: UIViewController,UITableViewDelegate,UITableViewDa let vc = UIStoryboard(name: "HomePage", bundle: nil).instantiateViewController(withIdentifier: "RankingTableViewController") as! RankingTableViewController self.navigationController?.pushViewController(vc, animated: true) }else{ - + let download = DownLoad.share + download.superVC = self + download.downLoadWithUrl(url: resourceData[indexPath.row].f_ResourceUrl) } } //取消键盘输入状态 diff --git a/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift b/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift index 6cf3770..58a9e4e 100644 --- a/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift +++ b/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift @@ -15,6 +15,7 @@ class TVStationViewController: UIViewController { var excellentTVStationProgram:[TVStationSubject] = [] @IBOutlet weak var tableView: UITableView! var TVStationType:[String] = ["十佳电视台","优秀电视台","优秀校园节目"] + var TVicon:[String] = ["icon_ranking","icon_hotcourse","icon_tvstation"] override func viewDidLoad() { super.viewDidLoad() self.configTheme() @@ -116,14 +117,14 @@ extension TVStationViewController:UITableViewDelegate,UITableViewDataSource{ func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { let view = UIView(frame: CGRect(x: 0, y: 0, width: getScreenWidth(), height: 44)) view.backgroundColor = tableView.backgroundColor - let imageView = UIImageView(frame: CGRect(x: 8, y: 8, width: 28, height: 28)) - imageView.image = UIImage(named: "icon") - let label = UILabel(frame: CGRect(x: imageView.frame.maxX+8, y: 11, width: 100, height: 21)) + let imageView = UIImageView(frame: CGRect(x: 8, y: 11, width: 20, height: 20)) + imageView.image = UIImage(named: TVicon[section]) + let label = UILabel(frame: CGRect(x: imageView.frame.maxX+16, y: 11, width: 100, height: 21)) label.text = TVStationType[section] label.textAlignment = .left label.sizeToFit() let btn = UIButton(frame: CGRect(x: getScreenWidth() - 8 - 30, y: 7, width: 30, height: 30)) - btn.setImage(UIImage(named:"moreHot"), for: .normal) + btn.setImage(#imageLiteral(resourceName: "arrow.png"), for: .normal) btn.tag = section btn.addTarget(self, action: #selector(TVStationViewController.moreBtnClick(sender:)), for: .touchUpInside) view.addSubview(btn) @@ -192,6 +193,10 @@ extension TVStationViewController:UICollectionViewDelegate,UICollectionViewDeleg } } + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { + return UIEdgeInsetsMake(0, 10, 0, 10) + } + } class TVStationViewControllerTableViewCell:UITableViewCell{ diff --git a/YouerLiveVideo/YouerLiveVideo/util/DownLoad.swift b/YouerLiveVideo/YouerLiveVideo/util/DownLoad.swift index 5a34a0f..12fa54e 100644 --- a/YouerLiveVideo/YouerLiveVideo/util/DownLoad.swift +++ b/YouerLiveVideo/YouerLiveVideo/util/DownLoad.swift @@ -38,7 +38,9 @@ class DownLoad :NSObject,QLPreviewControllerDataSource { } } func openIt(name:String){ + let ql = QLPreviewController() + ql.hidesBottomBarWhenPushed = true ql.dataSource = self pathName=name if self.superVC.navigationController == nil{ -- libgit2 0.21.0