Commit c42e7d84c888ba8450f4e7735c41d6e193e7bc85
Exists in
newLive
Merge branch 'newLive' of http://git.shunzhi.net/iosgroup/newlive into newLive
Showing
3 changed files
with
14 additions
and
5 deletions
Show diff stats
YouerLiveVideo/YouerLiveVideo/controllers/Resource/ResourceViewController.swift
| ... | ... | @@ -165,7 +165,9 @@ class ResourceViewController: UIViewController,UITableViewDelegate,UITableViewDa |
| 165 | 165 | let vc = UIStoryboard(name: "HomePage", bundle: nil).instantiateViewController(withIdentifier: "RankingTableViewController") as! RankingTableViewController |
| 166 | 166 | self.navigationController?.pushViewController(vc, animated: true) |
| 167 | 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 | 15 | var excellentTVStationProgram:[TVStationSubject] = [] |
| 16 | 16 | @IBOutlet weak var tableView: UITableView! |
| 17 | 17 | var TVStationType:[String] = ["十佳电视台","优秀电视台","优秀校园节目"] |
| 18 | + var TVicon:[String] = ["icon_ranking","icon_hotcourse","icon_tvstation"] | |
| 18 | 19 | override func viewDidLoad() { |
| 19 | 20 | super.viewDidLoad() |
| 20 | 21 | self.configTheme() |
| ... | ... | @@ -116,14 +117,14 @@ extension TVStationViewController:UITableViewDelegate,UITableViewDataSource{ |
| 116 | 117 | func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { |
| 117 | 118 | let view = UIView(frame: CGRect(x: 0, y: 0, width: getScreenWidth(), height: 44)) |
| 118 | 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 | 123 | label.text = TVStationType[section] |
| 123 | 124 | label.textAlignment = .left |
| 124 | 125 | label.sizeToFit() |
| 125 | 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 | 128 | btn.tag = section |
| 128 | 129 | btn.addTarget(self, action: #selector(TVStationViewController.moreBtnClick(sender:)), for: .touchUpInside) |
| 129 | 130 | view.addSubview(btn) |
| ... | ... | @@ -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 | 202 | class TVStationViewControllerTableViewCell:UITableViewCell{ | ... | ... |
YouerLiveVideo/YouerLiveVideo/util/DownLoad.swift
| ... | ... | @@ -38,7 +38,9 @@ class DownLoad :NSObject,QLPreviewControllerDataSource { |
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | func openIt(name:String){ |
| 41 | + | |
| 41 | 42 | let ql = QLPreviewController() |
| 43 | + ql.hidesBottomBarWhenPushed = true | |
| 42 | 44 | ql.dataSource = self |
| 43 | 45 | pathName=name |
| 44 | 46 | if self.superVC.navigationController == nil{ | ... | ... |