Commit 7a72221220496a2452a0a5d09a58538e8a6d4ab7
1 parent
c42e7d84
Exists in
newLive
no message
Showing
5 changed files
with
65 additions
and
39 deletions
Show diff stats
YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard
... | ... | @@ -24,29 +24,29 @@ |
24 | 24 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
25 | 25 | <subviews> |
26 | 26 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="za5-9d-anp"> |
27 | - <rect key="frame" x="0.0" y="108" width="375" height="50"/> | |
27 | + <rect key="frame" x="0.0" y="108" width="375" height="45"/> | |
28 | 28 | <subviews> |
29 | 29 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mgQ-3C-amN"> |
30 | - <rect key="frame" x="8" y="16" width="4" height="18"/> | |
30 | + <rect key="frame" x="8" y="13.5" width="4" height="18"/> | |
31 | 31 | <fontDescription key="fontDescription" type="system" pointSize="15"/> |
32 | 32 | <nil key="textColor"/> |
33 | 33 | <nil key="highlightedColor"/> |
34 | 34 | </label> |
35 | 35 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fz6-VO-SIi"> |
36 | - <rect key="frame" x="310" y="10" width="57" height="30"/> | |
36 | + <rect key="frame" x="332" y="7.5" width="35" height="30"/> | |
37 | 37 | <constraints> |
38 | 38 | <constraint firstAttribute="height" constant="30" id="NCP-Ag-7c1"/> |
39 | 39 | </constraints> |
40 | 40 | <fontDescription key="fontDescription" type="system" pointSize="17"/> |
41 | - <state key="normal" title="筛选" image="starLive"> | |
41 | + <state key="normal" title="筛选"> | |
42 | 42 | <color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
43 | 43 | </state> |
44 | 44 | <connections> |
45 | 45 | <action selector="jumpFilterVCAction:" destination="xEc-U1-QCp" eventType="touchUpInside" id="dlS-PP-Koh"/> |
46 | 46 | </connections> |
47 | 47 | </button> |
48 | - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="a7C-jD-YSJ"> | |
49 | - <rect key="frame" x="245" y="14" width="57" height="22"/> | |
48 | + <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="a7C-jD-YSJ"> | |
49 | + <rect key="frame" x="259" y="7.5" width="65" height="30"/> | |
50 | 50 | <fontDescription key="fontDescription" type="system" pointSize="17"/> |
51 | 51 | <state key="normal" title="排序" image="starLive"> |
52 | 52 | <color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
... | ... | @@ -61,17 +61,17 @@ |
61 | 61 | <constraint firstItem="a7C-jD-YSJ" firstAttribute="centerY" secondItem="za5-9d-anp" secondAttribute="centerY" id="e22-SY-dro"/> |
62 | 62 | <constraint firstItem="fz6-VO-SIi" firstAttribute="centerY" secondItem="za5-9d-anp" secondAttribute="centerY" id="qBE-uD-fE1"/> |
63 | 63 | <constraint firstItem="mgQ-3C-amN" firstAttribute="centerY" secondItem="za5-9d-anp" secondAttribute="centerY" id="uMv-pj-P7r"/> |
64 | - <constraint firstAttribute="height" constant="50" id="xiw-nW-gnr"/> | |
64 | + <constraint firstAttribute="height" constant="45" id="xiw-nW-gnr"/> | |
65 | 65 | <constraint firstItem="mgQ-3C-amN" firstAttribute="leading" secondItem="za5-9d-anp" secondAttribute="leading" constant="8" id="yW6-qE-tfE"/> |
66 | 66 | </constraints> |
67 | 67 | </view> |
68 | 68 | <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="143" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="su6-Ve-Mu4"> |
69 | - <rect key="frame" x="0.0" y="158" width="375" height="460"/> | |
70 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
69 | + <rect key="frame" x="0.0" y="153" width="375" height="465"/> | |
70 | + <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> | |
71 | 71 | <view key="tableFooterView" contentMode="scaleToFill" id="KPy-fi-ei0"> |
72 | 72 | <rect key="frame" x="0.0" y="171" width="375" height="1"/> |
73 | 73 | <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
74 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
74 | + <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> | |
75 | 75 | </view> |
76 | 76 | <prototypes> |
77 | 77 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="identifier" rowHeight="143" id="tO9-FG-1Ux" customClass="ResourceViewControllerTableViewCell" customModule="YouerLiveVideo" customModuleProvider="target"> |
... | ... | @@ -81,7 +81,7 @@ |
81 | 81 | <rect key="frame" x="0.0" y="0.0" width="375" height="142"/> |
82 | 82 | <autoresizingMask key="autoresizingMask"/> |
83 | 83 | <subviews> |
84 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="fqH-Ro-Yhh"> | |
84 | + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="fqH-Ro-Yhh"> | |
85 | 85 | <rect key="frame" x="8" y="26.5" width="90" height="90"/> |
86 | 86 | <constraints> |
87 | 87 | <constraint firstAttribute="width" constant="90" id="1QK-QU-Ukp"/> |
... | ... | @@ -114,21 +114,27 @@ |
114 | 114 | <nil key="highlightedColor"/> |
115 | 115 | </label> |
116 | 116 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yx0-8F-VaM"> |
117 | - <rect key="frame" x="287" y="25.5" width="80" height="35"/> | |
117 | + <rect key="frame" x="287" y="28" width="80" height="30"/> | |
118 | 118 | <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/> |
119 | 119 | <constraints> |
120 | - <constraint firstAttribute="height" constant="35" id="Jva-gB-kRb"/> | |
120 | + <constraint firstAttribute="height" constant="30" id="Jva-gB-kRb"/> | |
121 | 121 | <constraint firstAttribute="width" constant="80" id="gQ6-au-k70"/> |
122 | 122 | </constraints> |
123 | 123 | <state key="normal" title="预览"> |
124 | 124 | <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
125 | 125 | </state> |
126 | + <userDefinedRuntimeAttributes> | |
127 | + <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/> | |
128 | + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> | |
129 | + <integer key="value" value="5"/> | |
130 | + </userDefinedRuntimeAttribute> | |
131 | + </userDefinedRuntimeAttributes> | |
126 | 132 | </button> |
127 | 133 | <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_download" translatesAutoresizingMaskIntoConstraints="NO" id="ds9-Gw-nOf"> |
128 | - <rect key="frame" x="297" y="90.5" width="20" height="20"/> | |
134 | + <rect key="frame" x="302" y="93" width="15" height="15"/> | |
129 | 135 | <constraints> |
130 | 136 | <constraint firstAttribute="width" secondItem="ds9-Gw-nOf" secondAttribute="height" multiplier="1:1" id="Mto-fo-vVR"/> |
131 | - <constraint firstAttribute="width" constant="20" id="jkd-ZW-KU3"/> | |
137 | + <constraint firstAttribute="width" constant="15" id="jkd-ZW-KU3"/> | |
132 | 138 | </constraints> |
133 | 139 | </imageView> |
134 | 140 | </subviews> |
... | ... | @@ -1418,29 +1424,29 @@ |
1418 | 1424 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
1419 | 1425 | <subviews> |
1420 | 1426 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lPK-PF-JgI"> |
1421 | - <rect key="frame" x="0.0" y="108" width="375" height="50"/> | |
1427 | + <rect key="frame" x="0.0" y="108" width="375" height="45"/> | |
1422 | 1428 | <subviews> |
1423 | 1429 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0HY-Rz-WhJ"> |
1424 | - <rect key="frame" x="8" y="16" width="4" height="18"/> | |
1430 | + <rect key="frame" x="8" y="13.5" width="4" height="18"/> | |
1425 | 1431 | <fontDescription key="fontDescription" type="system" pointSize="15"/> |
1426 | 1432 | <nil key="textColor"/> |
1427 | 1433 | <nil key="highlightedColor"/> |
1428 | 1434 | </label> |
1429 | 1435 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4xl-zG-lqH"> |
1430 | - <rect key="frame" x="310" y="10" width="57" height="30"/> | |
1436 | + <rect key="frame" x="332" y="7.5" width="35" height="30"/> | |
1431 | 1437 | <constraints> |
1432 | 1438 | <constraint firstAttribute="height" constant="30" id="xBx-gX-mw4"/> |
1433 | 1439 | </constraints> |
1434 | 1440 | <fontDescription key="fontDescription" type="system" pointSize="17"/> |
1435 | - <state key="normal" title="筛选" image="starLive"> | |
1441 | + <state key="normal" title="筛选"> | |
1436 | 1442 | <color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
1437 | 1443 | </state> |
1438 | 1444 | <connections> |
1439 | 1445 | <action selector="jumpFilterVCAction:" destination="VUr-8w-9Ht" eventType="touchUpInside" id="Po2-Wd-wOq"/> |
1440 | 1446 | </connections> |
1441 | 1447 | </button> |
1442 | - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="T2j-JJ-ft5"> | |
1443 | - <rect key="frame" x="245" y="14" width="57" height="22"/> | |
1448 | + <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="T2j-JJ-ft5"> | |
1449 | + <rect key="frame" x="259" y="7.5" width="65" height="30"/> | |
1444 | 1450 | <fontDescription key="fontDescription" type="system" pointSize="17"/> |
1445 | 1451 | <state key="normal" title="排序" image="starLive"> |
1446 | 1452 | <color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
... | ... | @@ -1453,29 +1459,29 @@ |
1453 | 1459 | <constraint firstItem="0HY-Rz-WhJ" firstAttribute="leading" secondItem="lPK-PF-JgI" secondAttribute="leading" constant="8" id="6JE-7G-RGu"/> |
1454 | 1460 | <constraint firstItem="0HY-Rz-WhJ" firstAttribute="centerY" secondItem="lPK-PF-JgI" secondAttribute="centerY" id="9D4-TG-1g8"/> |
1455 | 1461 | <constraint firstAttribute="trailing" secondItem="4xl-zG-lqH" secondAttribute="trailing" constant="8" id="Cdo-PV-fQ7"/> |
1456 | - <constraint firstAttribute="height" constant="50" id="HmH-xv-An6"/> | |
1462 | + <constraint firstAttribute="height" constant="45" id="HmH-xv-An6"/> | |
1457 | 1463 | <constraint firstItem="T2j-JJ-ft5" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="0HY-Rz-WhJ" secondAttribute="trailing" constant="8" id="agG-vQ-QPp"/> |
1458 | 1464 | <constraint firstItem="T2j-JJ-ft5" firstAttribute="centerY" secondItem="lPK-PF-JgI" secondAttribute="centerY" id="bcz-kZ-cO2"/> |
1459 | 1465 | <constraint firstItem="4xl-zG-lqH" firstAttribute="centerY" secondItem="lPK-PF-JgI" secondAttribute="centerY" id="pAW-vr-qJ8"/> |
1460 | 1466 | </constraints> |
1461 | 1467 | </view> |
1462 | - <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="143" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="8oF-hk-183"> | |
1463 | - <rect key="frame" x="0.0" y="158" width="375" height="460"/> | |
1464 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
1468 | + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="143" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="8oF-hk-183"> | |
1469 | + <rect key="frame" x="0.0" y="153" width="375" height="465"/> | |
1470 | + <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> | |
1465 | 1471 | <view key="tableFooterView" contentMode="scaleToFill" id="DCR-ac-r7t"> |
1466 | 1472 | <rect key="frame" x="0.0" y="171" width="375" height="1"/> |
1467 | 1473 | <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
1468 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | |
1474 | + <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> | |
1469 | 1475 | </view> |
1470 | 1476 | <prototypes> |
1471 | 1477 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="identifier" rowHeight="143" id="IlC-3c-gI6" customClass="MicroCourseViewControllerTableViewCell" customModule="YouerLiveVideo" customModuleProvider="target"> |
1472 | 1478 | <rect key="frame" x="0.0" y="28" width="375" height="143"/> |
1473 | 1479 | <autoresizingMask key="autoresizingMask"/> |
1474 | 1480 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="IlC-3c-gI6" id="UCf-3H-9B1"> |
1475 | - <rect key="frame" x="0.0" y="0.0" width="375" height="143"/> | |
1481 | + <rect key="frame" x="0.0" y="0.0" width="375" height="142"/> | |
1476 | 1482 | <autoresizingMask key="autoresizingMask"/> |
1477 | 1483 | <subviews> |
1478 | - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="qia-pR-e6p"> | |
1484 | + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon" translatesAutoresizingMaskIntoConstraints="NO" id="qia-pR-e6p"> | |
1479 | 1485 | <rect key="frame" x="8" y="27" width="90" height="90"/> |
1480 | 1486 | <constraints> |
1481 | 1487 | <constraint firstAttribute="width" secondItem="qia-pR-e6p" secondAttribute="height" multiplier="1:1" id="6Zi-MO-Pqe"/> |
... | ... | @@ -1508,24 +1514,30 @@ |
1508 | 1514 | <nil key="highlightedColor"/> |
1509 | 1515 | </label> |
1510 | 1516 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jqG-kN-3bx"> |
1511 | - <rect key="frame" x="287" y="25" width="80" height="35"/> | |
1517 | + <rect key="frame" x="287" y="27.5" width="80" height="30"/> | |
1512 | 1518 | <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/> |
1513 | 1519 | <constraints> |
1514 | 1520 | <constraint firstAttribute="width" constant="80" id="Alz-7v-3a2"/> |
1515 | - <constraint firstAttribute="height" constant="35" id="CuG-T4-QtE"/> | |
1521 | + <constraint firstAttribute="height" constant="30" id="CuG-T4-QtE"/> | |
1516 | 1522 | </constraints> |
1517 | 1523 | <state key="normal" title="预览"> |
1518 | 1524 | <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
1519 | 1525 | </state> |
1526 | + <userDefinedRuntimeAttributes> | |
1527 | + <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/> | |
1528 | + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> | |
1529 | + <integer key="value" value="5"/> | |
1530 | + </userDefinedRuntimeAttribute> | |
1531 | + </userDefinedRuntimeAttributes> | |
1520 | 1532 | <connections> |
1521 | 1533 | <action selector="pushDetailVC:" destination="IlC-3c-gI6" eventType="touchUpInside" id="3BZ-om-ppg"/> |
1522 | 1534 | </connections> |
1523 | 1535 | </button> |
1524 | 1536 | <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_watchcount" translatesAutoresizingMaskIntoConstraints="NO" id="anY-xC-gfl"> |
1525 | - <rect key="frame" x="297" y="91" width="20" height="20"/> | |
1537 | + <rect key="frame" x="297" y="96" width="20" height="10"/> | |
1526 | 1538 | <constraints> |
1527 | 1539 | <constraint firstAttribute="width" constant="20" id="FKY-fi-PSd"/> |
1528 | - <constraint firstAttribute="width" secondItem="anY-xC-gfl" secondAttribute="height" multiplier="1:1" id="mbe-Kb-gfh"/> | |
1540 | + <constraint firstAttribute="height" constant="10" id="pGb-Oo-Maj"/> | |
1529 | 1541 | </constraints> |
1530 | 1542 | </imageView> |
1531 | 1543 | </subviews> | ... | ... |
YouerLiveVideo/YouerLiveVideo/controllers/HomePage/MainHomeTableViewController.swift
... | ... | @@ -343,8 +343,11 @@ class HomeThirdTableViewCell: UITableViewCell,UICollectionViewDelegate,UICollect |
343 | 343 | } |
344 | 344 | } |
345 | 345 | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { |
346 | - //点击进入学校 appRootViewController() | |
347 | - NSLog("点击了****\(dataSet[indexPath.row])") | |
346 | + //点击下载并打开资源文档 | |
347 | + let download = DownLoad.share | |
348 | + download.superVC = ((appRootViewController().childViewControllers[0] as! MViewController).selectedViewController as! UINavigationController).viewControllers[0] | |
349 | + download.downLoadWithUrl(url: dataSet[indexPath.row].f_ResourceUrl) | |
350 | + | |
348 | 351 | } |
349 | 352 | func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { |
350 | 353 | return CGSize(width: (getScreenWidth()-40)/3, height: (getScreenWidth()-40)/3+105.5) | ... | ... |
YouerLiveVideo/YouerLiveVideo/controllers/MicroCourse/MicroCourseViewController.swift
... | ... | @@ -161,6 +161,9 @@ class MicroCourseViewController: UIViewController,UITableViewDelegate,UITableVie |
161 | 161 | } |
162 | 162 | } |
163 | 163 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
164 | +// let vc = UIStoryboard(name: "Resource", bundle: nil).instantiateViewController(withIdentifier: "LiveInforViewControllerVC") as! LiveInforViewController | |
165 | +// vc.item=item | |
166 | +// self.superVC.navigationController!.pushViewController(vc, animated: true) | |
164 | 167 | if tableView==searchTableView { |
165 | 168 | let url = URL(string:searchAry[indexPath.row].f_ResourceUrl) |
166 | 169 | let player = AVPlayerViewController() |
... | ... | @@ -237,12 +240,17 @@ class MicroCourseViewControllerTableViewCell:UITableViewCell{ |
237 | 240 | iconImageView.sd_setImage(with: URL(string: item.f_Img), placeholderImage: UIImage(named: "icon_course_placeholder")) |
238 | 241 | titleLabel.text=item.f_Title |
239 | 242 | updateTeacherLabel.text="上传者:\(item.f_CreatorName) 老师" |
240 | - timeLabel.text=item.f_CreatorTime | |
243 | + timeLabel.text=setDateToString(date:dateFromISO8601(dateString: item.f_CreatorTime)) | |
241 | 244 | downLoadCountLabel.text="\(item.f_DownloadSum)" |
242 | 245 | } |
243 | 246 | @IBAction func pushDetailVC(_ sender: UIButton) { |
244 | - let vc = UIStoryboard(name: "Resource", bundle: nil).instantiateViewController(withIdentifier: "LiveInforViewControllerVC") as! LiveInforViewController | |
245 | - vc.item=item | |
246 | - self.superVC.navigationController!.pushViewController(vc, animated: true) | |
247 | +// let vc = UIStoryboard(name: "Resource", bundle: nil).instantiateViewController(withIdentifier: "LiveInforViewControllerVC") as! LiveInforViewController | |
248 | +// vc.item=item | |
249 | +// self.superVC.navigationController!.pushViewController(vc, animated: true) | |
250 | + let url = URL(string:item.f_ResourceUrl) | |
251 | + let player = AVPlayerViewController() | |
252 | + player.player = AVPlayer(url: url!) | |
253 | + player.videoGravity = AVLayerVideoGravityResizeAspect | |
254 | + self.superVC.present(player, animated: true, completion: nil) | |
247 | 255 | } |
248 | 256 | } | ... | ... |
YouerLiveVideo/YouerLiveVideo/controllers/Resource/FilterListViewController.swift
... | ... | @@ -96,6 +96,9 @@ class FilterListViewController: UIViewController,UITableViewDelegate,UITableView |
96 | 96 | }else{ |
97 | 97 | self.navigationController!.popViewController(animated: true) |
98 | 98 | } |
99 | + }else{ | |
100 | + //数据为空 | |
101 | + self.navigationController!.popViewController(animated: true) | |
99 | 102 | } |
100 | 103 | } |
101 | 104 | @IBAction func onDoneAction(_ sender: UIBarButtonItem) { | ... | ... |
YouerLiveVideo/YouerLiveVideo/controllers/Resource/ResourceViewController.swift
... | ... | @@ -248,7 +248,7 @@ class ResourceViewControllerTableViewCell:UITableViewCell{ |
248 | 248 | iconImageView.sd_setImage(with: URL(string: item.f_Img), placeholderImage: UIImage(named: "icon_course_placeholder")) |
249 | 249 | titleLabel.text=item.f_Title |
250 | 250 | updateTeacherLabel.text="上传者:\(item.f_CreatorName) 老师" |
251 | - timeLabel.text=item.f_CreatorTime | |
251 | + timeLabel.text=setDateToString(date:dateFromISO8601(dateString: item.f_CreatorTime)) | |
252 | 252 | downLoadCountLabel.text="\(item.f_DownloadSum)" |
253 | 253 | } |
254 | 254 | } | ... | ... |