Commit e3b3478cbf7ae7cee6868bffeb290a9fb8db134e

Authored by 葛建军
2 parents 7a722212 53a44107
Exists in newLive

Merge branch 'newLive' of http://git.shunzhi.net/iosgroup/newlive into newLive

# Conflicts:
#	YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard
YouerLiveVideo/YouerLiveVideo/controllers/TVStation/MoreTVStationViewController.swift
... ... @@ -19,7 +19,7 @@ class MoreTVStationViewController: UIViewController {
19 19 var pageIndex:Int = 2
20 20 override func viewDidLoad() {
21 21 super.viewDidLoad()
22   -
  22 + self.automaticallyAdjustsScrollViewInsets = false
23 23 if type != 0{
24 24 addCellAndRefresh()
25 25 }
... ... @@ -147,6 +147,14 @@ extension MoreTVStationViewController:UICollectionViewDelegate,UICollectionViewD
147 147 }
148 148 }
149 149  
  150 + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
  151 + return UIEdgeInsetsMake(10, 10, 10, 10)
  152 + }
  153 +
  154 + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
  155 + return CGSize(width: (getScreenWidth()-30)/2, height: 180)
  156 + }
  157 +
150 158 }
151 159  
152 160 class MoreTVStationViewCollectionCell:UICollectionViewCell{
... ...
YouerLiveVideo/YouerLiveVideo/controllers/TVStation/SearchTVStationListViewController.swift
... ... @@ -90,6 +90,16 @@ class SearchTVStationListViewController: UIViewController,UISearchBarDelegate {
90 90 selectTableView.reloadData()
91 91 }
92 92  
  93 + func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
  94 + searchBar.setShowsCancelButton(true, animated: true)
  95 + return true
  96 + }
  97 +
  98 + func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
  99 + searchBar.setShowsCancelButton(false, animated: true)
  100 + searchBar.resignFirstResponder()
  101 + }
  102 +
93 103 //搜索:根据搜索框中内容帅选全部符合的列表
94 104 func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
95 105 searchBar.resignFirstResponder()
... ...
YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStation.storyboard
... ... @@ -24,7 +24,7 @@
24 24 <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="T5M-Yy-22h">
25 25 <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
26 26 <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
27   - <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="8" minimumInteritemSpacing="8" id="EWj-Hf-n52">
  27 + <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="EWj-Hf-n52">
28 28 <size key="itemSize" width="180" height="182"/>
29 29 <size key="headerReferenceSize" width="0.0" height="0.0"/>
30 30 <size key="footerReferenceSize" width="0.0" height="0.0"/>
... ... @@ -39,23 +39,38 @@
39 39 <autoresizingMask key="autoresizingMask"/>
40 40 <subviews>
41 41 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="x1d-Bc-juB">
42   - <rect key="frame" x="0.0" y="0.0" width="180" height="148"/>
  42 + <rect key="frame" x="0.0" y="0.0" width="180" height="128"/>
  43 + <constraints>
  44 + <constraint firstAttribute="width" secondItem="x1d-Bc-juB" secondAttribute="height" multiplier="45:32" id="UyF-Ua-iSP"/>
  45 + </constraints>
43 46 </imageView>
44   - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8hi-XF-Vgx">
45   - <rect key="frame" x="71.5" y="156" width="37.5" height="18"/>
46   - <fontDescription key="fontDescription" type="system" pointSize="15"/>
47   - <nil key="textColor"/>
48   - <nil key="highlightedColor"/>
49   - </label>
  47 + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ibk-FN-SZr">
  48 + <rect key="frame" x="0.0" y="128" width="180" height="54"/>
  49 + <subviews>
  50 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8hi-XF-Vgx">
  51 + <rect key="frame" x="71.5" y="18" width="37.5" height="18"/>
  52 + <fontDescription key="fontDescription" type="system" pointSize="15"/>
  53 + <nil key="textColor"/>
  54 + <nil key="highlightedColor"/>
  55 + </label>
  56 + </subviews>
  57 + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  58 + <constraints>
  59 + <constraint firstItem="8hi-XF-Vgx" firstAttribute="centerY" secondItem="Ibk-FN-SZr" secondAttribute="centerY" id="PuK-GO-6aZ"/>
  60 + <constraint firstItem="8hi-XF-Vgx" firstAttribute="centerX" secondItem="Ibk-FN-SZr" secondAttribute="centerX" id="afd-Dr-FIr"/>
  61 + </constraints>
  62 + </view>
50 63 </subviews>
51 64 </view>
  65 + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
52 66 <constraints>
  67 + <constraint firstAttribute="bottom" secondItem="Ibk-FN-SZr" secondAttribute="bottom" id="5EZ-dA-p3Y"/>
53 68 <constraint firstAttribute="trailing" secondItem="x1d-Bc-juB" secondAttribute="trailing" id="6dA-qR-VvU"/>
54   - <constraint firstAttribute="bottom" secondItem="8hi-XF-Vgx" secondAttribute="bottom" constant="8" id="7yl-Kb-JGR"/>
55   - <constraint firstItem="8hi-XF-Vgx" firstAttribute="centerX" secondItem="Es8-By-Vgs" secondAttribute="centerX" id="Bua-Ka-aqB"/>
56 69 <constraint firstItem="x1d-Bc-juB" firstAttribute="leading" secondItem="Es8-By-Vgs" secondAttribute="leading" id="ED3-B0-TcW"/>
  70 + <constraint firstItem="Ibk-FN-SZr" firstAttribute="leading" secondItem="Es8-By-Vgs" secondAttribute="leading" id="RBq-Ms-5of"/>
57 71 <constraint firstItem="x1d-Bc-juB" firstAttribute="top" secondItem="Es8-By-Vgs" secondAttribute="top" id="SVy-Ie-v5b"/>
58   - <constraint firstItem="8hi-XF-Vgx" firstAttribute="top" secondItem="x1d-Bc-juB" secondAttribute="bottom" constant="8" id="ZHk-2T-zIf"/>
  72 + <constraint firstAttribute="trailing" secondItem="Ibk-FN-SZr" secondAttribute="trailing" id="juw-Mj-qlE"/>
  73 + <constraint firstItem="Ibk-FN-SZr" firstAttribute="top" secondItem="x1d-Bc-juB" secondAttribute="bottom" id="sB8-a4-r8s"/>
59 74 </constraints>
60 75 <connections>
61 76 <outlet property="tvPicture" destination="x1d-Bc-juB" id="588-mP-2uu"/>
... ... @@ -253,7 +268,7 @@
253 268 <rect key="frame" x="0.0" y="44" width="375" height="48"/>
254 269 <subviews>
255 270 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="REy-qu-6cO">
256   - <rect key="frame" x="144.5" y="0.0" width="86" height="48"/>
  271 + <rect key="frame" x="142" y="0.0" width="91" height="48"/>
257 272 <subviews>
258 273 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EkU-OV-GCU">
259 274 <rect key="frame" x="8" y="13" width="42" height="21"/>
... ... @@ -261,11 +276,11 @@
261 276 <nil key="textColor"/>
262 277 <nil key="highlightedColor"/>
263 278 </label>
264   - <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="30V-Xl-lRB">
265   - <rect key="frame" x="58" y="14" width="20" height="20"/>
  279 + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_open" translatesAutoresizingMaskIntoConstraints="NO" id="30V-Xl-lRB">
  280 + <rect key="frame" x="58" y="16.5" width="25" height="15"/>
266 281 <constraints>
267   - <constraint firstAttribute="height" constant="20" id="5L5-sW-hMu"/>
268   - <constraint firstAttribute="width" secondItem="30V-Xl-lRB" secondAttribute="height" multiplier="1:1" id="MYE-j0-EQV"/>
  282 + <constraint firstAttribute="height" constant="15" id="5L5-sW-hMu"/>
  283 + <constraint firstAttribute="width" secondItem="30V-Xl-lRB" secondAttribute="height" multiplier="5:3" id="MYE-j0-EQV"/>
269 284 </constraints>
270 285 </imageView>
271 286 </subviews>
... ... @@ -361,7 +376,7 @@
361 376 <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LO5-7p-BlF">
362 377 <rect key="frame" x="0.0" y="92" width="375" height="575"/>
363 378 <subviews>
364   - <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="IbJ-62-QUz">
  379 + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" keyboardDismissMode="onDrag" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="IbJ-62-QUz">
365 380 <rect key="frame" x="0.0" y="0.0" width="375" height="575"/>
366 381 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
367 382 <view key="tableFooterView" contentMode="scaleToFill" id="3xH-Ja-uTC">
... ... @@ -682,6 +697,7 @@
682 697 </scenes>
683 698 <resources>
684 699 <image name="arrow" width="7" height="12"/>
  700 + <image name="icon_open" width="14" height="8"/>
685 701 <image name="starLive" width="30" height="30"/>
686 702 </resources>
687 703 </document>
... ...
YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift
... ... @@ -138,6 +138,10 @@ extension TVStationViewController:UITableViewDelegate,UITableViewDataSource{
138 138 }
139 139  
140 140  
  141 + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  142 + return 150
  143 + }
  144 +
141 145 func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
142 146 }
143 147  
... ... @@ -197,6 +201,11 @@ extension TVStationViewController:UICollectionViewDelegate,UICollectionViewDeleg
197 201 return UIEdgeInsetsMake(0, 10, 0, 10)
198 202 }
199 203  
  204 + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
  205 + return CGSize(width: (getScreenWidth()-30)/2, height: 150)
  206 + }
  207 +
  208 +
200 209 }
201 210  
202 211 class TVStationViewControllerTableViewCell:UITableViewCell{
... ...
YouerLiveVideo/YouerLiveVideo/controllers/User/UserEditViewController.swift
... ... @@ -29,7 +29,7 @@ class UserEditViewController: UIViewController ,UIImagePickerControllerDelegate,
29 29 }else{
30 30 ident = "教师"
31 31 }
32   - contentArr = [user.name(),user.userid,ident,user.schoolName()]
  32 + contentArr = [user.name(),user.phone(),ident,user.schoolName()]
33 33 }
34 34  
35 35 override func viewWillAppear(_ animated: Bool) {
... ...
YouerLiveVideo/YouerLiveVideo/controllers/User/UserViewController.swift
... ... @@ -154,6 +154,16 @@ extension UserViewController:UITableViewDelegate,UITableViewDataSource{
154 154 return 44
155 155 }
156 156  
  157 + func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
  158 + return 15
  159 + }
  160 +
  161 + func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
  162 + let view = UIView(frame: CGRect(x: 0, y: 0, width: getScreenWidth(), height: 15))
  163 + view.backgroundColor = UIColor.clear
  164 + return view
  165 + }
  166 +
157 167 override func viewWillAppear(_ animated: Bool) {
158 168 super.viewWillAppear(animated)
159 169 self.tabBarController?.tabBar.isHidden = false
... ...