From 642a5f75edf89e62701bd734d2ad31f2cb217ea0 Mon Sep 17 00:00:00 2001 From: 葛建军 <jun@gejianjundeMac-mini.local> Date: Thu, 25 May 2017 08:57:07 +0800 Subject: [PATCH] no message --- YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard | 4 ++-- YouerLiveVideo/YouerLiveVideo/controllers/HomePage/MainHomeTableViewController.swift | 10 +++++++++- YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift | 11 +++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard b/YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard index c1f5314..1ab759b 100644 --- a/YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard +++ b/YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard @@ -731,7 +731,7 @@ <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/> <nil key="highlightedColor"/> </label> - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ZWf-Th-UTw"> + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ZWf-Th-UTw"> <rect key="frame" x="0.0" y="0.0" width="128" height="128"/> <constraints> <constraint firstAttribute="width" secondItem="ZWf-Th-UTw" secondAttribute="height" multiplier="1:1" id="u0O-8v-OqH"/> @@ -1656,7 +1656,7 @@ <image name="icon_tvstation" width="25" height="25"/> <image name="icon_user" width="25" height="25"/> <image name="icon_watchcount" width="12" height="7"/> - <image name="starLive" width="22" height="22"/> + <image name="starLive" width="30" height="30"/> <image name="视窗.png" width="31" height="31"/> </resources> </document> diff --git a/YouerLiveVideo/YouerLiveVideo/controllers/HomePage/MainHomeTableViewController.swift b/YouerLiveVideo/YouerLiveVideo/controllers/HomePage/MainHomeTableViewController.swift index 8c33c24..6e1f5f5 100644 --- a/YouerLiveVideo/YouerLiveVideo/controllers/HomePage/MainHomeTableViewController.swift +++ b/YouerLiveVideo/YouerLiveVideo/controllers/HomePage/MainHomeTableViewController.swift @@ -403,7 +403,15 @@ class HomeFourTableViewCell: UITableViewCell,UICollectionViewDelegate,UICollecti } func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { //点击进入学校 appRootViewController() - NSLog("点击了****\(dataSet[indexPath.row])") + let vc = Story.instantiateViewControllerWithIdentifier("TVStationInforViewControllerVC", storyName: "TVStation") as! TVStationInforViewController + if collectionView.tag == 1{ + vc.TVStationProgram = TVStationInfor(item: dataSet[indexPath.row]) + vc.title = dataSet[indexPath.row].f_Title + }else if collectionView.tag == 3{ + vc.title = dataSet[indexPath.row].f_Title + vc.excellentTVStationProgram = TVStationSubject(item: dataSet[indexPath.row]) + } + ((appRootViewController().childViewControllers[0] as! MViewController).selectedViewController as! UINavigationController).pushViewController(vc, animated: true) } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { return CGSize(width: (getScreenWidth()-40)/3, height: (getScreenWidth()-40)/3+30) diff --git a/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift b/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift index 6cf3770..ebd085f 100644 --- a/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift +++ b/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift @@ -241,6 +241,11 @@ class TVStationInfor { f_IsExcellent = json["f_IsExcellent"].boolValue f_Url = json["f_Url"].stringValue } + init(item:MicroCourseModel){ + f_Logo=item.f_Img + f_SchoolName=item.f_Title + f_CreatorTime=item.f_CreatorTime + } } class TVStationSubject { @@ -316,4 +321,10 @@ class TVStationSubject { f_TelevisionId = json["f_TelevisionId"].stringValue } + init(item:MicroCourseModel){ + f_Img=item.f_Img + f_Title=item.f_Title + f_CreatorTime=item.f_CreatorTime + f_Detail=item.f_Detail + } } -- libgit2 0.21.0