Commit 85266fcb authored by lujunye's avatar lujunye

备注修改完成

parent 114609f9
{
"images" : [
{
"filename" : "delS@1x.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "delS@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "delS@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
...@@ -10,7 +11,7 @@ ...@@ -10,7 +11,7 @@
<objects> <objects>
<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="OnlyLabelCell" customModule="GeliBusinessPlatform" customModuleProvider="target"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="OnlyLabelCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/> <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<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">
......
...@@ -10,6 +10,10 @@ import UIKit ...@@ -10,6 +10,10 @@ import UIKit
class TitleAndLblCell: UITableViewCell { class TitleAndLblCell: UITableViewCell {
@IBOutlet weak var imgRight: NSLayoutConstraint!
@IBOutlet weak var btmLine: UIView!
@IBOutlet weak var btmW: NSLayoutConstraint!
@IBOutlet weak var contentRight: NSLayoutConstraint!
@IBOutlet weak var contentLbl: UILabel! @IBOutlet weak var contentLbl: UILabel!
@IBOutlet weak var nameLbl: UILabel! @IBOutlet weak var nameLbl: UILabel!
override func awakeFromNib() { override func awakeFromNib() {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/> <capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
...@@ -21,43 +22,60 @@ ...@@ -21,43 +22,60 @@
<rect key="frame" x="15" y="43" width="305" height="1"/> <rect key="frame" x="15" y="43" width="305" height="1"/>
<color key="backgroundColor" name="灰色分界线"/> <color key="backgroundColor" name="灰色分界线"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="1" id="cj0-kf-8SN"/> <constraint firstAttribute="height" constant="1" id="7hZ-vt-9DW"/>
</constraints> </constraints>
</view> </view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="标题" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yit-1Y-dYH"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="标题" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yit-1Y-dYH">
<rect key="frame" x="15" y="0.0" width="27" height="43"/> <rect key="frame" x="15" y="13" width="27" height="18.5"/>
<constraints>
<constraint firstAttribute="height" constant="18.5" id="U31-tG-pjN"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="内容" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qgN-Hz-wKY"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="delS" translatesAutoresizingMaskIntoConstraints="NO" id="pmc-vU-Uf4">
<rect key="frame" x="278" y="0.0" width="27" height="43"/> <rect key="frame" x="305" y="14.5" width="0.0" height="15"/>
<constraints>
<constraint firstAttribute="width" id="HMa-Pi-Faw"/>
<constraint firstAttribute="height" constant="15" id="veV-Pg-H0Y"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="View.tishiLbl.text = &quot;&quot;View.tishiLbl.text = &quot;&quot;View.tishiLbl.text = &quot;&quot;" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zee-Po-sID">
<rect key="frame" x="57" y="15" width="248" height="13"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="FhC-zl-Pqx" secondAttribute="trailing" id="0dP-lG-tJk"/> <constraint firstItem="pmc-vU-Uf4" firstAttribute="leading" secondItem="zee-Po-sID" secondAttribute="trailing" id="3x0-4l-7Mq"/>
<constraint firstItem="qgN-Hz-wKY" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="BLy-iS-f2e"/> <constraint firstItem="zee-Po-sID" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="15" id="GwD-l1-HuW"/>
<constraint firstItem="FhC-zl-Pqx" firstAttribute="top" secondItem="yit-1Y-dYH" secondAttribute="bottom" id="H9s-B7-yLY"/> <constraint firstAttribute="trailing" secondItem="FhC-zl-Pqx" secondAttribute="trailing" id="If6-Gs-gZd"/>
<constraint firstAttribute="trailing" secondItem="qgN-Hz-wKY" secondAttribute="trailing" constant="15" id="HjE-gb-zaY"/> <constraint firstAttribute="bottom" secondItem="FhC-zl-Pqx" secondAttribute="bottom" id="LYe-vI-oas"/>
<constraint firstItem="yit-1Y-dYH" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="Ijc-8r-P72"/> <constraint firstItem="zee-Po-sID" firstAttribute="leading" secondItem="yit-1Y-dYH" secondAttribute="trailing" constant="15" id="Pj9-aB-1Dx"/>
<constraint firstItem="FhC-zl-Pqx" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="Pva-mW-eJ5"/> <constraint firstAttribute="trailing" secondItem="pmc-vU-Uf4" secondAttribute="trailing" constant="15" id="Qok-R2-hO0"/>
<constraint firstItem="FhC-zl-Pqx" firstAttribute="top" secondItem="qgN-Hz-wKY" secondAttribute="bottom" id="YmO-Ya-ofg"/> <constraint firstItem="pmc-vU-Uf4" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="VxE-7o-zqj"/>
<constraint firstItem="yit-1Y-dYH" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="ZDx-ia-byC"/> <constraint firstItem="yit-1Y-dYH" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="g9y-AH-qVF"/>
<constraint firstAttribute="bottom" secondItem="FhC-zl-Pqx" secondAttribute="bottom" id="q5c-dX-dmo"/> <constraint firstItem="FhC-zl-Pqx" firstAttribute="top" secondItem="zee-Po-sID" secondAttribute="bottom" constant="15" id="gMg-Md-ISS"/>
<constraint firstItem="FhC-zl-Pqx" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="jug-3M-ccD"/>
<constraint firstItem="yit-1Y-dYH" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="te9-wX-58V"/>
</constraints> </constraints>
</tableViewCellContentView> </tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/> <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections> <connections>
<outlet property="contentLbl" destination="qgN-Hz-wKY" id="sZW-4d-RVO"/> <outlet property="btmLine" destination="FhC-zl-Pqx" id="q0E-2a-h3I"/>
<outlet property="btmW" destination="HMa-Pi-Faw" id="htd-Lp-MF8"/>
<outlet property="contentLbl" destination="zee-Po-sID" id="GmM-kp-g5c"/>
<outlet property="contentRight" destination="3x0-4l-7Mq" id="MWO-ix-mMP"/>
<outlet property="imgRight" destination="Qok-R2-hO0" id="aeV-7Q-HFP"/>
<outlet property="nameLbl" destination="yit-1Y-dYH" id="S4K-8f-ncw"/> <outlet property="nameLbl" destination="yit-1Y-dYH" id="S4K-8f-ncw"/>
</connections> </connections>
<point key="canvasLocation" x="132" y="106"/> <point key="canvasLocation" x="131.8840579710145" y="105.80357142857143"/>
</tableViewCell> </tableViewCell>
</objects> </objects>
<resources> <resources>
<image name="delS" width="30" height="30"/>
<namedColor name="标题字颜色"> <namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入内容" textAlignment="right" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="Q6V-I9-aNd"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入内容" textAlignment="right" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Q6V-I9-aNd">
<rect key="frame" x="266.5" y="15.5" width="93.5" height="19"/> <rect key="frame" x="293.5" y="15.5" width="66.5" height="19"/>
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
<textInputTraits key="textInputTraits"/> <textInputTraits key="textInputTraits"/>
......
...@@ -11,7 +11,12 @@ import UIKit ...@@ -11,7 +11,12 @@ import UIKit
protocol XinCaiGouViewControllerDelegate { protocol XinCaiGouViewControllerDelegate {
func XinCaiGouViewControllerFinish() func XinCaiGouViewControllerFinish()
} }
class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,CGDCellDelegate,XuanZeShangPinViewControllerDelegate, ShowTimeSelectViewDelegate,GLAlertSelectViewDelegate, GYSListViewControllerDelegate,UITextFieldDelegate, GeliAlertViewDelegate{ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,CGDCellDelegate,XuanZeShangPinViewControllerDelegate, ShowTimeSelectViewDelegate,GLAlertSelectViewDelegate, GYSListViewControllerDelegate,UITextFieldDelegate, GeliAlertViewDelegate,GeliAlertTextViewDelegate{
func sureGeliAlertTextViewAction(sender: String) {
contentStr = sender
listView.reloadData()
}
var delegate:XinCaiGouViewControllerDelegate? var delegate:XinCaiGouViewControllerDelegate?
...@@ -65,9 +70,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -65,9 +70,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
if textField.tag == 3 { if textField.tag == 3 {
cgName = textField.text cgName = textField.text
} }
if textField.tag == 5 {
contentStr = textField.text
}
listView.reloadData() listView.reloadData()
} }
func GLASClose(view: GLAlertSelectView, selectnum: Int, selectArr: Array<Int>) { func GLASClose(view: GLAlertSelectView, selectnum: Int, selectArr: Array<Int>) {
...@@ -77,7 +80,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -77,7 +80,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
} }
func GLAlertSelectViewClick(selectNum: Int, view: GLAlertSelectView) { func GLAlertSelectViewClick(selectNum: Int, view: GLAlertSelectView) {
typeSelect = selectNum typeSelect = selectNum
if typeSelect != nil && typeSelect != 10086 { if typeSelect != 10086 {
holderArr.insert(typeArr[typeSelect], at: 4) holderArr.insert(typeArr[typeSelect], at: 4)
holderArr.remove(at: 5) holderArr.remove(at: 5)
listView.reloadData() listView.reloadData()
...@@ -113,7 +116,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -113,7 +116,7 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
var glSelectView:GLAlertSelectView? var glSelectView:GLAlertSelectView?
var typeSelect = 1 var typeSelect = 1
var cgName:String? var cgName:String?
var contentStr:String? var contentStr = ""
//MARK: - 提交审核 //MARK: - 提交审核
@IBAction func submitAction(_ sender: Any) { @IBAction func submitAction(_ sender: Any) {
print("submit") print("submit")
...@@ -183,8 +186,9 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -183,8 +186,9 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
listView.register(UINib(nibName: "TitleAndTFCell", bundle: nil), forCellReuseIdentifier: "TitleAndTFCell") listView.register(UINib(nibName: "TitleAndTFCell", bundle: nil), forCellReuseIdentifier: "TitleAndTFCell")
listView.register(UINib(nibName: "CGDDayCell", bundle: nil), forCellReuseIdentifier: "CGDDayCell") listView.register(UINib(nibName: "CGDDayCell", bundle: nil), forCellReuseIdentifier: "CGDDayCell")
listView.register(UINib(nibName: "CGDCell", bundle: nil), forCellReuseIdentifier: "CGDCell") listView.register(UINib(nibName: "CGDCell", bundle: nil), forCellReuseIdentifier: "CGDCell")
listView.estimatedRowHeight = 49
listView.rowHeight = UITableView.automaticDimension listView.register(UINib(nibName: "TitleAndLblCell", bundle: nil), forCellReuseIdentifier: "TitleAndLblCell")
} }
//MARK: - cell delegate //MARK: - cell delegate
...@@ -231,6 +235,19 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -231,6 +235,19 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
glSelectView = view glSelectView = view
} }
break break
case 5:
let alterView = GeliAlertTextView(frame: self.view.window!.bounds)
alterView.delegate = self
alterView.titleLbl.text = "请填写备注(选填)"
alterView.placerLbl.text = "请填写备注..."
if contentStr.count == 0 {
alterView.placerLbl.isHidden = false
}else{
alterView.textview.text = contentStr
alterView.placerLbl.isHidden = true
}
self.view.window?.addSubview(alterView)
break
default: default:
break break
} }
...@@ -273,6 +290,26 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -273,6 +290,26 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
} }
return cell return cell
}else{ }else{
if indexPath.row == 5 {
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndLblCell") as! TitleAndLblCell
cell.nameLbl.text = titleArr[indexPath.row]
cell.btmLine.isHidden = true
if contentStr.count != 0 {
cell.contentLbl.text = contentStr
cell.btmW.constant = 15
cell.contentRight.constant = 5
cell.imgRight.constant = 22
cell.contentLbl.textColor = UIColor(named: "标题字颜色")
}else{
cell.contentLbl.text = holderArr[indexPath.row]
cell.btmW.constant = 0
cell.contentRight.constant = 0
cell.imgRight.constant = 15
cell.contentLbl.textColor = UIColor(named: "#999999")
}
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell
if orderNum != nil { if orderNum != nil {
cell.textTF.clearButtonMode = .always cell.textTF.clearButtonMode = .always
...@@ -289,7 +326,6 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -289,7 +326,6 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
cell.textTF.clearButtonMode = .never cell.textTF.clearButtonMode = .never
} }
} }
cell.nameLbl.text = titleArr[indexPath.row] cell.nameLbl.text = titleArr[indexPath.row]
cell.textTF.placeholder = holderArr[indexPath.row] cell.textTF.placeholder = holderArr[indexPath.row]
cell.textTF.delegate = self cell.textTF.delegate = self
...@@ -297,10 +333,6 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -297,10 +333,6 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
if indexPath.row == 3 { if indexPath.row == 3 {
cell.textTF.text = cgName cell.textTF.text = cgName
} }
if indexPath.row == 5 {
cell.textTF.text = contentStr
}
return cell return cell
} }
...@@ -320,21 +352,35 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -320,21 +352,35 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 1 {
return 174
}
if indexPath.section == 0 { if indexPath.section == 0 {
if indexPath.row == 0 { if indexPath.row == 0 {
if orderNum == nil { if orderNum == nil {
return 0.01 return 0.01
}else{
return 49
} }
} }
if indexPath.row == 5 { if indexPath.row == 5 {
return tableView.rowHeight if getStrHeight(str: contentStr)+30 > 49 {
return getStrHeight(str: contentStr)+30
}
}
} }
return 49 return 49
} }
return 174
func getStrHeight(str:String) -> CGFloat{
let lbl = UILabel()
lbl.text = titleArr.last
lbl.font = UIFont.systemFont(ofSize: 13)
lbl.sizeToFit()
let margin = lbl.bounds.size.width + 77
let viewSize = CGSize(width:fullScreenWidth - margin , height: CGFloat(MAXFLOAT))
let font = UIFont.systemFont(ofSize: 13)
return (str as NSString).boundingRect(with: viewSize, options: [.usesLineFragmentOrigin], attributes: [NSAttributedString.Key.font:font], context: nil).height
} }
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
if section == 0 { if section == 0 {
let view = UIView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 15)) let view = UIView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 15))
......
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