Commit ad2b4667 authored by 刘俊宏's avatar 刘俊宏

完成货拉拉运单详情UI页面

parent ece28070
{ {
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [ "colors" : [
{ {
"idiom" : "universal",
"color" : { "color" : {
"color-space" : "srgb", "color-space" : "srgb",
"components" : { "components" : {
"red" : "1.000",
"alpha" : "1.000", "alpha" : "1.000",
"blue" : "0.471", "blue" : "0x78",
"green" : "0.690" "green" : "0xAF",
"red" : "0xFF"
} }
} },
"idiom" : "universal"
} }
] ],
} "info" : {
\ No newline at end of file "author" : "xcode",
"version" : 1
}
}
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x78",
"green" : "0xB0",
"red" : "0xFF"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xB4",
"green" : "0xB4",
"red" : "0xB4"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xB9",
"green" : "0xB9",
"red" : "0xB9"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -29,3 +29,51 @@ class BaseView: UIView { ...@@ -29,3 +29,51 @@ class BaseView: UIView {
*/ */
} }
/**
* 通过 CAShapeLayer 方式绘制虚线
*
* param lineView: 需要绘制成虚线的view
* param lineLength: 虚线的宽度
* param lineSpacing: 虚线的间距
* param lineColor: 虚线的颜色
* param lineDirection 虚线的方向 true 为水平方向, false 为垂直方向
**/
func drawLineOfDashByCAShapeLayer(lineView:UIView!,
lineLength:Int,
lineSpacing:Int,
lineColor:UIColor,
isHorizonal:Bool) {
let shapeLayer = CAShapeLayer()
shapeLayer.bounds = lineView.bounds
if (isHorizonal){
shapeLayer.position = CGPoint(x: lineView.frame.width/2, y: lineView.frame.height)
}else{
shapeLayer.position = CGPoint(x: lineView.frame.size.width/2, y: lineView.frame.size.height/2)
}
shapeLayer.fillColor = UIColor.clear.cgColor
shapeLayer.strokeColor = lineColor.cgColor
//设置线宽
if (isHorizonal){
shapeLayer.lineWidth = lineView.frame.size.height
}else{
shapeLayer.lineWidth = lineView.frame.size.width
}
shapeLayer.lineJoin = .round
// 设置线宽,线间距
shapeLayer.lineDashPattern = [NSNumber(integerLiteral: lineLength),NSNumber(integerLiteral: lineSpacing)]
// 设置路径
let path = CGMutablePath()
path.move(to: CGPoint(x: 0, y: 0), transform: .identity)
if isHorizonal {
path.addLine(to: CGPoint(x: lineView.frame.width, y: 0), transform: .identity)
} else {
path.addLine(to: CGPoint(x: 0, y: lineView.frame.height), transform: .identity)
}
shapeLayer.path = path
// 把绘制好的虚线添加上来
lineView.layer.addSublayer(shapeLayer)
}
<?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" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/> <device id="retina4_7" 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="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
......
<?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" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/> <device id="retina4_7" 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="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SelectContentView" customModule="GeliBusinessPlatform" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SelectContentView" customModule="TestClass" customModuleProvider="target">
<connections> <connections>
<outlet property="tabContentHeight" destination="S1h-DP-cWZ" id="pxH-D1-vbP"/> <outlet property="tabContentHeight" destination="S1h-DP-cWZ" id="pxH-D1-vbP"/>
<outlet property="tabContentV" destination="bMO-eQ-C5Q" id="ta3-G5-KzK"/> <outlet property="tabContentV" destination="bMO-eQ-C5Q" id="ta3-G5-KzK"/>
......
<?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="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/> <device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/> <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="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WorkSelectTimeView" customModule="GeliBusinessPlatform" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WorkSelectTimeView" customModule="TestClass" customModuleProvider="target">
<connections> <connections>
<outlet property="fBtn" destination="dQT-gl-rh7" id="giD-mj-Qaw"/> <outlet property="fBtn" destination="dQT-gl-rh7" id="giD-mj-Qaw"/>
<outlet property="lBtn" destination="sEd-Ix-rtO" id="ING-79-wTh"/> <outlet property="lBtn" destination="sEd-Ix-rtO" id="ING-79-wTh"/>
...@@ -183,7 +184,7 @@ ...@@ -183,7 +184,7 @@
</objects> </objects>
<resources> <resources>
<namedColor name="多选按钮字体颜色"> <namedColor name="多选按钮字体颜色">
<color red="0.41200000047683716" green="0.41200000047683716" blue="0.41200000047683716" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.41176470588235292" green="0.41176470588235292" blue="0.41176470588235292" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="多选按钮背景颜色"> <namedColor name="多选按钮背景颜色">
<color red="0.83899998664855957" green="0.875" blue="0.9179999828338623" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.83899998664855957" green="0.875" blue="0.9179999828338623" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
......
<?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="retina4_7" orientation="portrait" appearance="light"/> <device id="retina4_7" 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"/>
</dependencies> </dependencies>
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="XiaDanChengGongViewController" customModule="GeliBusinessPlatform" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="XiaDanChengGongViewController" customModule="TestClass" customModuleProvider="target">
<connections> <connections>
<outlet property="listView" destination="Hgm-Vh-hNf" id="Z1n-x4-dVj"/> <outlet property="listView" destination="Hgm-Vh-hNf" id="Z1n-x4-dVj"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
......
//
// WaybillDetailViewController.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/7/24.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITableViewDataSource{
@IBOutlet weak var listView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = "运单详情"
self.view.addSubview(navbar)
SetTopFrameView(view: listView, btmView: self.view)
listView.register(UINib(nibName: "WayBillAddressItemCell", bundle: nil), forCellReuseIdentifier: "WayBillAddressItemCell")
listView.register(UINib(nibName: "DriverItemTableViewCell", bundle: nil), forCellReuseIdentifier: "DriverItemTableViewCell")
listView.register(UINib(nibName: "TitleAndTFCell", bundle: nil), forCellReuseIdentifier: "TitleAndTFCell")
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 0 {
return 1
}
if section == 3 || section == 4{
return 2
}
return 3
}
func numberOfSections(in tableView: UITableView) -> Int {
return 5;
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 0 {
return 103
}
if indexPath.section == 2 {
return 30
}
if indexPath.section == 3 || indexPath.section == 4{
return 35
}
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: "DriverItemTableViewCell") as! DriverItemTableViewCell
return cell
}
if indexPath.section == 2 || indexPath.section == 3 || indexPath.section == 4{
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndTFCell") as! TitleAndTFCell
cell.textTF.isUserInteractionEnabled = false
cell.line.isHidden = true
if indexPath.section == 2 {
cell.nameLbl.text = "起步价(小面包车)"
cell.textTF.text = "¥22.4"
cell.nameLbl.textColor = UIColor.init(named: "灰色字体颜色")
cell.textTF.textColor = UIColor.init(named: "标题字颜色")
}else if indexPath.section == 3 {
cell.nameLbl.text = "关联平台"
cell.textTF.text = "格利食品网"
cell.nameLbl.textColor = UIColor.init(named: "标题字颜色")
cell.textTF.textColor = UIColor.init(named: "标题字颜色")
}else if indexPath.section == 4 {
cell.nameLbl.textColor = UIColor.init(named: "标题字颜色")
cell.textTF.textColor = UIColor.init(named: "灰色字体颜色")
cell.nameLbl.text = "货物保障"
cell.textTF.text = "保障成功"
}
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "WayBillAddressItemCell") as! WayBillAddressItemCell
cell.iconW.constant = 22
cell.iconH.constant = 22
cell.iconLbl.layer.cornerRadius = 11
cell.lineTopView.isHidden = false
if indexPath.row == 0 {
cell.addressDetailLbl.text = "广东省广州市白云区嘉禾望岗白云大道交叉"
cell.iconLbl.text = "发"
cell.iconLbl.backgroundColor = UIColor.init(named: "蓝色字体颜色")
cell.lineTopView.isHidden = true
}else{
cell.addressDetailLbl.text = "广东省广州市白云区嘉禾望岗白云大道交叉路口东南侧州市白云区嘉禾望岗白云大道交叉路口东南侧(望岗村民委员会西侧约150米))"
}
if indexPath.row == 1 {
cell.iconLbl.text = ""
cell.iconLbl.backgroundColor = UIColor.init(named: "虚线分界线颜色")
cell.iconW.constant = 12
cell.iconH.constant = 12
cell.iconLbl.layer.cornerRadius = 6
}
if indexPath.row == 2 {
//最后的不显示lineview
cell.lineView.isHidden = true
cell.iconLbl.text = "收"
cell.iconLbl.backgroundColor = UIColor.init(named: "企业、预售字体")
}else{
cell.lineView.isHidden = false
}
return cell
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
if section == 1 || section == 2{
return 45
}
if section == 3 || section == 4{
return 10
}
return 0.01
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let headerView = UIView()
for subV in headerView.subviews {
subV.removeFromSuperview()
}
headerView.backgroundColor = UIColor.white
if section == 1 || section == 2 {
let headerV = TitleTimeHeaderFooterView()
headerView.addSubview(headerV)
headerV.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalTo(0);
}
if section == 2 {
headerV.titleLbl.text = "订单费用"
headerV.fuTitleLbl.text = "总计¥662.6"
headerV.titleLbl.font = UIFont.boldSystemFont(ofSize: 15)
headerV.fuTitleLbl.font = UIFont.boldSystemFont(ofSize: 15)
}
}
return headerView
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
if section == 1 {
return 110
}
if section == 2 {
return 60
}
if section == 3 || section == 4{
return 10
}
return 0.01
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let footerView = UIView()
for subV in footerView.subviews {
subV.removeFromSuperview()
}
footerView.backgroundColor = UIColor.white
let lineView = UIView()
lineView.backgroundColor = UIColor.init(named: "灰色分界线")
if section == 1 {
let footerV = TitleTimeHeaderFooterView()
footerView.addSubview(footerV)
footerV.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalTo(0);
}
footerV.titleLbl.text = "联系人:"
footerV.fuTitleLbl.text = "梁小锋(15577124121)"
footerView.addSubview(lineView)
lineView.snp.makeConstraints { (make) in
make.left.bottom.right.equalTo(0)
make.height.equalTo(5)
}
}
if section == 2 {
let tishiLbl = UILabel()
tishiLbl.text = "若产生消费、高速费、停车费、逾时等候费和搬运费,需要您额外支付。额外费用不可使用赠金支付"
tishiLbl.numberOfLines = 0
tishiLbl.textColor = UIColor.init(named: "提示语字体颜色")
tishiLbl.font = UIFont.init(name: "PingFang SC", size: 11)
footerView.addSubview(tishiLbl)
tishiLbl.snp.makeConstraints { (make) in
make.top.equalTo(10)
make.left.equalTo(15)
make.right.equalTo(-20)
}
tishiLbl.backgroundColor = UIColor.white
footerView.addSubview(lineView)
lineView.snp.makeConstraints { (make) in
make.left.bottom.right.equalTo(0)
make.height.equalTo(5)
}
}
if section == 3 {
footerView.addSubview(lineView)
lineView.snp.makeConstraints { (make) in
make.left.bottom.right.equalTo(0)
make.height.equalTo(5)
}
}
return footerView
}
}
<?xml version="1.0" encoding="UTF-8"?>
<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"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WaybillDetailViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="listView" destination="t9e-fZ-mil" id="VdO-Ax-iiU"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="t9e-fZ-mil">
<rect key="frame" x="0.0" y="44" width="414" height="852"/>
<color key="backgroundColor" name="app底色"/>
<connections>
<outlet property="dataSource" destination="-1" id="Ue9-ix-Dvl"/>
<outlet property="delegate" destination="-1" id="g8m-rX-68V"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="t9e-fZ-mil" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="1yK-Aa-n27"/>
<constraint firstItem="t9e-fZ-mil" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="KiF-kF-x0G"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="t9e-fZ-mil" secondAttribute="trailing" id="YsZ-fO-gKR"/>
<constraint firstAttribute="bottom" secondItem="t9e-fZ-mil" secondAttribute="bottom" id="sg2-wZ-QVS"/>
</constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="132" y="125"/>
</view>
</objects>
<resources>
<namedColor name="app底色">
<color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
//
// DriverItemTableViewCell.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/7/24.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class DriverItemTableViewCell: UITableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
<?xml version="1.0" encoding="UTF-8"?>
<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"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="142" id="KGk-i7-Jjw" customClass="DriverItemTableViewCell" customModule="TestClass" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="377" height="142"/>
<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">
<rect key="frame" x="0.0" y="0.0" width="377" height="142"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Wqp-PP-Pfx">
<rect key="frame" x="40" y="37" width="68" height="68"/>
<color key="backgroundColor" name="app底色"/>
<constraints>
<constraint firstAttribute="height" constant="68" id="EGf-63-lkU"/>
<constraint firstAttribute="width" constant="68" id="UXX-DE-as8"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="34"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="黄师傅" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c3R-LQ-jdQ">
<rect key="frame" x="130" y="37" width="45" height="21"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="15"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="粤ADK023 (野马)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nhF-X3-1zA">
<rect key="frame" x="130" y="64.5" width="107" height="19"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="厢式货车(长27*款16.7*高3.6)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bcL-SK-guN">
<rect key="frame" x="130" y="86.5" width="188" height="18.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xAU-Y2-m4K">
<rect key="frame" x="0.0" y="141" width="377" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="oXy-7p-8ik"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="bcL-SK-guN" firstAttribute="leading" secondItem="Wqp-PP-Pfx" secondAttribute="trailing" constant="22" id="7Al-j8-Lyg"/>
<constraint firstItem="bcL-SK-guN" firstAttribute="bottom" secondItem="Wqp-PP-Pfx" secondAttribute="bottom" id="Ce9-JT-2f6"/>
<constraint firstAttribute="bottom" secondItem="xAU-Y2-m4K" secondAttribute="bottom" id="IrZ-1V-YGv"/>
<constraint firstItem="Wqp-PP-Pfx" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="40" id="Rpj-Y6-gIc"/>
<constraint firstItem="c3R-LQ-jdQ" firstAttribute="top" secondItem="Wqp-PP-Pfx" secondAttribute="top" id="dNU-hd-aY5"/>
<constraint firstItem="c3R-LQ-jdQ" firstAttribute="leading" secondItem="Wqp-PP-Pfx" secondAttribute="trailing" constant="22" id="giH-j3-uz0"/>
<constraint firstItem="Wqp-PP-Pfx" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="hBt-Bl-2Gz"/>
<constraint firstItem="nhF-X3-1zA" firstAttribute="leading" secondItem="Wqp-PP-Pfx" secondAttribute="trailing" constant="22" id="jwA-BP-bb4"/>
<constraint firstItem="xAU-Y2-m4K" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="qXW-Po-Ukp"/>
<constraint firstAttribute="trailing" secondItem="xAU-Y2-m4K" secondAttribute="trailing" id="wZd-6Q-6ie"/>
<constraint firstItem="bcL-SK-guN" firstAttribute="top" secondItem="nhF-X3-1zA" secondAttribute="bottom" constant="3" id="zZB-N8-JAA"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<point key="canvasLocation" x="173.18840579710147" y="157.36607142857142"/>
</tableViewCell>
</objects>
<resources>
<namedColor name="app底色">
<color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="标题字颜色">
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="灰色分界线">
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="灰色字体颜色">
<color red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
//
// TitleTimeHeaderView.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/7/24.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
class TitleTimeHeaderFooterView: UIView {
var contentView:UIView!
@IBOutlet weak var fuTitleLbl: UILabel!
@IBOutlet weak var titleLbl: UILabel!
//初始化时将xib中的view添加进来
override init(frame: CGRect) {
super.init(frame: frame)
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview()
}
}
// /初始化时将xib中的view添加进来
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview()
}
}
//加载xib
func loadViewFromNib() -> UIView {
let className = type(of: self)
let bundle = Bundle(for: className)
let name = NSStringFromClass(className).components(separatedBy: ".").last
let nib = UINib(nibName: name!, bundle: bundle)
let view = nib.instantiate(withOwner: self, options: nil).first as! UIView
return view
}
}
//
// WayBillAddressItemCell.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/7/24.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class WayBillAddressItemCell: UITableViewCell {
@IBOutlet weak var lineTopView: UIView!
@IBOutlet weak var iconW: NSLayoutConstraint!
@IBOutlet weak var iconH: NSLayoutConstraint!
@IBOutlet weak var lineView: UIView!
@IBOutlet weak var namePhoneLbl: UILabel!
@IBOutlet weak var addressDetailLbl: UILabel!
@IBOutlet weak var addressLbl: UILabel!
@IBOutlet weak var iconLbl: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
}
open override func layoutSubviews() {
super.layoutSubviews()
self.contentView.setNeedsLayout()
self.contentView.layoutIfNeeded()
drawLineOfDashByCAShapeLayer(lineView:lineView, lineLength: 5, lineSpacing: 5, lineColor: UIColor.init(named: "虚线分界线颜色")!, isHorizonal: false)
drawLineOfDashByCAShapeLayer(lineView:lineTopView, lineLength: 5, lineSpacing: 5, lineColor: UIColor.init(named: "虚线分界线颜色")!, isHorizonal: false)
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
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