Commit 09f07cfe authored by lujunye's avatar lujunye

修复地址分行显示

parent 1600d410
......@@ -109,8 +109,8 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
if cus_id != nil {
HUD.flash(.progress)
searchBgH.constant = 0
getAddrsInfo(["user_token":UserToken,"cus_id":cus_id], success: { (data) in
self.adrInfo = data as! GetAddrsInfoModel
getAddrsInfo(["user_token":UserToken as Any,"cus_id":cus_id as Any], success: { (data) in
self.adrInfo = (data as! GetAddrsInfoModel)
self.listView.reloadData()
HUD.hide()
}) { (error) in
......@@ -152,7 +152,8 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
btmLblHeight.constant = 0
}
listView.estimatedRowHeight = 49
listView.rowHeight = UITableView.automaticDimension
// Do any additional setup after loading the view.
}
......@@ -187,9 +188,7 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
}
return adrArrs.count
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 79
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "DiZhiGuanLiCell") as! DiZhiGuanLiCell
cell.delegate = self
......@@ -295,6 +294,10 @@ class DZGLViewController: BaseViewController,UITableViewDelegate,UITableViewData
options.expansionStyle = .selection //展开样式(默认为.none)
return options
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return tableView.rowHeight
}
func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> [SwipeAction]? {
let tag = indexPath.row
......
......@@ -73,8 +73,8 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="广东省广州市番禺区市桥南路电脑城" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SOh-hJ-gKS">
<rect key="frame" x="50" y="52" width="212.5" height="16"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="广东省广州市番禺区市桥南路电脑城" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SOh-hJ-gKS">
<rect key="frame" x="50" y="48.5" width="290" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/>
......@@ -112,18 +112,20 @@
<constraint firstItem="vAQ-5q-KPr" firstAttribute="leading" secondItem="oeS-KW-qjD" secondAttribute="trailing" constant="15" id="4ok-AC-XWT"/>
<constraint firstAttribute="trailing" secondItem="raS-k5-oNa" secondAttribute="trailing" id="5WN-Ud-Jc7"/>
<constraint firstItem="oeS-KW-qjD" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="79g-ox-Ohm"/>
<constraint firstItem="raS-k5-oNa" firstAttribute="top" secondItem="SOh-hJ-gKS" secondAttribute="bottom" constant="9" id="7WS-7Y-X8x"/>
<constraint firstItem="0Zd-v3-Vtu" firstAttribute="centerY" secondItem="vAQ-5q-KPr" secondAttribute="centerY" id="94d-JF-XNY"/>
<constraint firstItem="raS-k5-oNa" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="Bl7-ud-MH8"/>
<constraint firstItem="vAQ-5q-KPr" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="15" id="GB4-TQ-IJc"/>
<constraint firstItem="7eJ-B4-h9O" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="H4Y-Hp-W29"/>
<constraint firstItem="SOh-hJ-gKS" firstAttribute="top" secondItem="jf6-0X-5eB" secondAttribute="bottom" constant="15" id="Lxh-Z0-Emg"/>
<constraint firstItem="jf6-0X-5eB" firstAttribute="centerY" secondItem="0Zd-v3-Vtu" secondAttribute="centerY" id="Mbj-p2-VdQ"/>
<constraint firstItem="raS-k5-oNa" firstAttribute="top" secondItem="SOh-hJ-gKS" secondAttribute="bottom" constant="10" id="Q1e-gA-4qh"/>
<constraint firstItem="mWp-V0-KaZ" firstAttribute="leading" secondItem="jf6-0X-5eB" secondAttribute="trailing" constant="10" id="Q58-SO-drh"/>
<constraint firstItem="oeS-KW-qjD" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="cia-6b-Gc1"/>
<constraint firstItem="SOh-hJ-gKS" firstAttribute="leading" secondItem="vAQ-5q-KPr" secondAttribute="leading" id="is0-NC-Im1"/>
<constraint firstItem="7eJ-B4-h9O" firstAttribute="leading" secondItem="SOh-hJ-gKS" secondAttribute="trailing" constant="15" id="iaQ-5H-nCe"/>
<constraint firstAttribute="bottom" secondItem="raS-k5-oNa" secondAttribute="bottom" id="ow3-Vt-3kW"/>
<constraint firstAttribute="trailing" secondItem="7eJ-B4-h9O" secondAttribute="trailing" constant="15" id="rrB-jM-gXG"/>
<constraint firstItem="mWp-V0-KaZ" firstAttribute="centerY" secondItem="jf6-0X-5eB" secondAttribute="centerY" id="sXS-NF-LT4"/>
<constraint firstItem="SOh-hJ-gKS" firstAttribute="leading" secondItem="vAQ-5q-KPr" secondAttribute="leading" id="vqA-bs-BfP"/>
<constraint firstItem="jf6-0X-5eB" firstAttribute="leading" secondItem="0Zd-v3-Vtu" secondAttribute="trailing" constant="10" id="wng-fe-Xxb"/>
</constraints>
</tableViewCellContentView>
......
......@@ -104,13 +104,10 @@ class MsgCenterViewController: BaseViewController,UITableViewDelegate,UITableVie
//MARK: -Cell delegate方法
// func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
// return 120
// }
func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
print(tableView.estimatedRowHeight)
return 250
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return tableView.rowHeight
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.dataModelArr.count
}
......
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