Commit 08f71982 authored by lujunye's avatar lujunye

运单列表cell,添加按钮(有按钮高度257,没按钮高度227)按钮acButton,默认隐藏

parent 7d39bfca
...@@ -29,6 +29,8 @@ class YunDanLieBiaoCell: UITableViewCell { ...@@ -29,6 +29,8 @@ class YunDanLieBiaoCell: UITableViewCell {
@IBOutlet weak var productNameLbl: UILabel! @IBOutlet weak var productNameLbl: UILabel!
/// 签收状态 /// 签收状态
@IBOutlet weak var signLbl: UILabel! @IBOutlet weak var signLbl: UILabel!
/// 根据状态给标题
@IBOutlet weak var acButton: UIButton!
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
selectionStyle = .none selectionStyle = .none
......
...@@ -12,14 +12,14 @@ ...@@ -12,14 +12,14 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="YunDanLieBiaoCell" customModule="TestClass" customModuleProvider="target"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="YunDanLieBiaoCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="212"/> <rect key="frame" x="0.0" y="0.0" width="375" height="272"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="375" height="212"/> <rect key="frame" x="0.0" y="0.0" width="375" height="272"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="naO-D9-yP8"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="naO-D9-yP8">
<rect key="frame" x="15" y="15" width="345" height="197"/> <rect key="frame" x="15" y="15" width="345" height="257"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="标题" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lzG-zA-SOj"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="标题" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lzG-zA-SOj">
<rect key="frame" x="10" y="10" width="335" height="15"/> <rect key="frame" x="10" y="10" width="335" height="15"/>
...@@ -134,6 +134,29 @@ ...@@ -134,6 +134,29 @@
<color key="textColor" name="灰色字体颜色"/> <color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gc6-oj-wSU">
<rect key="frame" x="250" y="212" width="80" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="Kss-y0-K0x"/>
<constraint firstAttribute="width" constant="80" id="fNi-M7-jbf"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="title">
<color key="titleColor" name="蓝色字体颜色"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="3"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" name="蓝色字体颜色"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</button>
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints> <constraints>
...@@ -146,6 +169,8 @@ ...@@ -146,6 +169,8 @@
<constraint firstItem="q1h-8u-ej2" firstAttribute="top" secondItem="lzG-zA-SOj" secondAttribute="bottom" constant="26" id="9gh-Or-VWo"/> <constraint firstItem="q1h-8u-ej2" firstAttribute="top" secondItem="lzG-zA-SOj" secondAttribute="bottom" constant="26" id="9gh-Or-VWo"/>
<constraint firstItem="lzG-zA-SOj" firstAttribute="leading" secondItem="naO-D9-yP8" secondAttribute="leading" constant="10" id="A3W-QU-KVZ"/> <constraint firstItem="lzG-zA-SOj" firstAttribute="leading" secondItem="naO-D9-yP8" secondAttribute="leading" constant="10" id="A3W-QU-KVZ"/>
<constraint firstAttribute="trailing" secondItem="lzG-zA-SOj" secondAttribute="trailing" id="A76-17-yka"/> <constraint firstAttribute="trailing" secondItem="lzG-zA-SOj" secondAttribute="trailing" id="A76-17-yka"/>
<constraint firstAttribute="trailing" secondItem="gc6-oj-wSU" secondAttribute="trailing" constant="15" id="CYF-Ih-Kfh"/>
<constraint firstAttribute="bottom" secondItem="gc6-oj-wSU" secondAttribute="bottom" constant="15" id="IY1-VT-7ad"/>
<constraint firstItem="aOy-Ef-DsK" firstAttribute="top" secondItem="q1h-8u-ej2" secondAttribute="bottom" constant="20" id="J2G-Z6-4oG"/> <constraint firstItem="aOy-Ef-DsK" firstAttribute="top" secondItem="q1h-8u-ej2" secondAttribute="bottom" constant="20" id="J2G-Z6-4oG"/>
<constraint firstAttribute="trailing" secondItem="Tvb-s6-5wR" secondAttribute="trailing" constant="10" id="OFj-DC-kAx"/> <constraint firstAttribute="trailing" secondItem="Tvb-s6-5wR" secondAttribute="trailing" constant="10" id="OFj-DC-kAx"/>
<constraint firstItem="lzG-zA-SOj" firstAttribute="top" secondItem="naO-D9-yP8" secondAttribute="top" constant="10" id="PT0-J5-xcL"/> <constraint firstItem="lzG-zA-SOj" firstAttribute="top" secondItem="naO-D9-yP8" secondAttribute="top" constant="10" id="PT0-J5-xcL"/>
...@@ -187,6 +212,7 @@ ...@@ -187,6 +212,7 @@
</tableViewCellContentView> </tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/> <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections> <connections>
<outlet property="acButton" destination="gc6-oj-wSU" id="kNJ-10-zkL"/>
<outlet property="orderNumLbl" destination="8BK-xs-SBV" id="W4o-gt-gov"/> <outlet property="orderNumLbl" destination="8BK-xs-SBV" id="W4o-gt-gov"/>
<outlet property="productNameLbl" destination="aOy-Ef-DsK" id="B00-w4-ZG4"/> <outlet property="productNameLbl" destination="aOy-Ef-DsK" id="B00-w4-ZG4"/>
<outlet property="receiverLbl" destination="0f7-bf-rJa" id="d2a-uD-7Ks"/> <outlet property="receiverLbl" destination="0f7-bf-rJa" id="d2a-uD-7Ks"/>
......
...@@ -487,8 +487,8 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD ...@@ -487,8 +487,8 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
case 75: //收支统计 case 75: //收支统计
// HUD.flash(.label("敬请期待"),delay: 1.2) // HUD.flash(.label("敬请期待"),delay: 1.2)
// return // return
// let vc = XiaYunDanViewController() // let vc = XiaYunDanViewController()
// let vc = ToAndFormSelectViewController()
let vc = ShouZhiTongJiViewController() let vc = ShouZhiTongJiViewController()
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
return return
......
...@@ -76,7 +76,7 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea ...@@ -76,7 +76,7 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
btn.isSelected = !btn.isSelected btn.isSelected = !btn.isSelected
if btn.isSelected { if btn.isSelected {
btn.setTitleColor(UIColor.white, for: .normal) btn.setTitleColor(UIColor.white, for: .normal)
btn.backgroundColor = UIColor(named: "按钮背景颜色") btn.backgroundColor = UIColor(named: "按钮渐变色上")
}else{ }else{
btn.setTitleColor(UIColor(named: "个人中心灰色字体"), for: .normal) btn.setTitleColor(UIColor(named: "个人中心灰色字体"), for: .normal)
btn.backgroundColor = UIColor(named: "多选按钮背景颜色") btn.backgroundColor = UIColor(named: "多选按钮背景颜色")
...@@ -87,6 +87,12 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea ...@@ -87,6 +87,12 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
btnUISet(btn: sender) btnUISet(btn: sender)
} }
switch sender.titleLabel?.text { switch sender.titleLabel?.text {
case "顺丰":
break
case "货拉拉":
break
case "全部":
break
case "京东": case "京东":
break break
case "已付款": case "已付款":
...@@ -209,6 +215,9 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea ...@@ -209,6 +215,9 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
} }
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
return 257
}
return 227 return 227
} }
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
...@@ -218,6 +227,9 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea ...@@ -218,6 +227,9 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "YunDanLieBiaoCell") as! YunDanLieBiaoCell let cell = tableView.dequeueReusableCell(withIdentifier: "YunDanLieBiaoCell") as! YunDanLieBiaoCell
cell.tag = indexPath.row cell.tag = indexPath.row
if cell.tag == 0 {
cell.acButton.isHidden = false
}
return cell return cell
} }
func textFieldDidBeginEditing(_ textField: UITextField) { func textFieldDidBeginEditing(_ textField: UITextField) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment