Commit 56009bcf authored by 刘俊宏's avatar 刘俊宏

接入订单列表+头部滚动

parent 227e14f1
......@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 52;
objects = {
/* Begin PBXBuildFile section */
......@@ -191,6 +191,10 @@
F95567A82453DA86009674AB /* WarehoseMangementListVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = F95567A62453DA86009674AB /* WarehoseMangementListVC.xib */; };
F95567AB2453E40B009674AB /* OrderListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F95567A92453E40B009674AB /* OrderListViewController.swift */; };
F95567AC2453E40B009674AB /* OrderListViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F95567AA2453E40B009674AB /* OrderListViewController.xib */; };
F95A9ED224551D0400867849 /* Parchment in Frameworks */ = {isa = PBXBuildFile; productRef = F95A9ED124551D0400867849 /* Parchment */; };
F95A9ED524551DF900867849 /* UIView+constraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = F95A9ED424551DF900867849 /* UIView+constraints.swift */; };
F95A9ED8245520E500867849 /* OrderListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F95A9ED6245520E500867849 /* OrderListVC.swift */; };
F95A9ED9245520E500867849 /* OrderListVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = F95A9ED7245520E500867849 /* OrderListVC.xib */; };
F95D9B5024484FAE0080D6E3 /* GeliAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F95D9B4F24484FAE0080D6E3 /* GeliAlertView.xib */; };
F95D9B522448530E0080D6E3 /* GeliAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F95D9B512448530E0080D6E3 /* GeliAlertView.swift */; };
F95D9CA424493E840080D6E3 /* ShopInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F95D9CA224493E840080D6E3 /* ShopInfoViewController.swift */; };
......@@ -445,6 +449,9 @@
F95567A62453DA86009674AB /* WarehoseMangementListVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WarehoseMangementListVC.xib; sourceTree = "<group>"; };
F95567A92453E40B009674AB /* OrderListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderListViewController.swift; sourceTree = "<group>"; };
F95567AA2453E40B009674AB /* OrderListViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OrderListViewController.xib; sourceTree = "<group>"; };
F95A9ED424551DF900867849 /* UIView+constraints.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+constraints.swift"; sourceTree = "<group>"; };
F95A9ED6245520E500867849 /* OrderListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderListVC.swift; sourceTree = "<group>"; };
F95A9ED7245520E500867849 /* OrderListVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OrderListVC.xib; sourceTree = "<group>"; };
F95D9B4F24484FAE0080D6E3 /* GeliAlertView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GeliAlertView.xib; sourceTree = "<group>"; };
F95D9B512448530E0080D6E3 /* GeliAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeliAlertView.swift; sourceTree = "<group>"; };
F95D9CA224493E840080D6E3 /* ShopInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShopInfoViewController.swift; sourceTree = "<group>"; };
......@@ -468,6 +475,7 @@
buildActionMask = 2147483647;
files = (
9C3AD0BD567C3C122CCE3169 /* Pods_GeliBusinessPlatform.framework in Frameworks */,
F95A9ED224551D0400867849 /* Parchment in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -686,6 +694,7 @@
E088CC882446FFA1000DAA8A /* Other */ = {
isa = PBXGroup;
children = (
F95A9ED324551DDC00867849 /* Parchment */,
F933F6D02452DAC300189561 /* TabBarVc */,
F933F6AD2452C65C00189561 /* HUD */,
F950FDB524518B3300C40530 /* 日历 */,
......@@ -1123,6 +1132,14 @@
path = FSCalendar;
sourceTree = "<group>";
};
F95A9ED324551DDC00867849 /* Parchment */ = {
isa = PBXGroup;
children = (
F95A9ED424551DF900867849 /* UIView+constraints.swift */,
);
path = Parchment;
sourceTree = "<group>";
};
F95D9B4E24484F140080D6E3 /* AlertView */ = {
isa = PBXGroup;
children = (
......@@ -1167,6 +1184,8 @@
children = (
F95567A92453E40B009674AB /* OrderListViewController.swift */,
F95567AA2453E40B009674AB /* OrderListViewController.xib */,
F95A9ED6245520E500867849 /* OrderListVC.swift */,
F95A9ED7245520E500867849 /* OrderListVC.xib */,
);
path = "订单列表";
sourceTree = "<group>";
......@@ -1218,6 +1237,9 @@
dependencies = (
);
name = GeliBusinessPlatform;
packageProductDependencies = (
F95A9ED124551D0400867849 /* Parchment */,
);
productName = GeliBusinessPlatform;
productReference = E00D85DB244561FD00F5F816 /* GeliBusinessPlatform.app */;
productType = "com.apple.product-type.application";
......@@ -1291,6 +1313,9 @@
Base,
);
mainGroup = E00D85D2244561FD00F5F816;
packageReferences = (
F95A9ED024551D0400867849 /* XCRemoteSwiftPackageReference "Parchment" */,
);
productRefGroup = E00D85DC244561FD00F5F816 /* Products */;
projectDirPath = "";
projectRoot = "";
......@@ -1359,6 +1384,7 @@
E01C26B12446989700ADCC70 /* Interface_Z.plist in Resources */,
F969BF08244EC38000C79953 /* GoodsCollectionViewCell.xib in Resources */,
E0D4166524483058008DCAB4 /* ChangePassViewController.xib in Resources */,
F95A9ED9245520E500867849 /* OrderListVC.xib in Resources */,
E02DDD9A24501A5B00ABB707 /* DelGuiGeCell.xib in Resources */,
E00D85E8244561FE00F5F816 /* Preview Assets.xcassets in Resources */,
E02DDD962450106C00ABB707 /* PuTongJieTiCell.xib in Resources */,
......@@ -1488,6 +1514,7 @@
E0516F7F244806C500E373CE /* MsgCenterViewController.swift in Sources */,
F950FDA52451453A00C40530 /* ShopInfoModel.swift in Sources */,
E0516F822448086700E373CE /* MsgCenterCell.swift in Sources */,
F95A9ED524551DF900867849 /* UIView+constraints.swift in Sources */,
F933F6CA2452C68B00189561 /* PKHUDRotatingImageView.swift in Sources */,
F950FDE324518B9500C40530 /* FSCalendarHeaderView.m in Sources */,
F950FDA32451438A00C40530 /* AdminInfoModel.swift in Sources */,
......@@ -1540,6 +1567,7 @@
F950FDD824518B9500C40530 /* FSCalendarDelegationProxy.m in Sources */,
F950FDDF24518B9500C40530 /* FSCalendarSeparatorDecorationView.m in Sources */,
F9023F692449A50900DD5A63 /* TitleContentCell.swift in Sources */,
F95A9ED8245520E500867849 /* OrderListVC.swift in Sources */,
F933F6CE2452C68B00189561 /* PKHUDSquareBaseView.swift in Sources */,
E0DDCB1D244AE81800DF54C7 /* GuanLianKeHuCell.swift in Sources */,
E0D197BF2448431C002B080C /* BabyBluetooth.m in Sources */,
......@@ -1900,6 +1928,25 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCRemoteSwiftPackageReference section */
F95A9ED024551D0400867849 /* XCRemoteSwiftPackageReference "Parchment" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/rechsteiner/Parchment";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 2.3.0;
};
};
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
F95A9ED124551D0400867849 /* Parchment */ = {
isa = XCSwiftPackageProductDependency;
package = F95A9ED024551D0400867849 /* XCRemoteSwiftPackageReference "Parchment" */;
productName = Parchment;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = E00D85D3244561FD00F5F816 /* Project object */;
}
{
"object": {
"pins": [
{
"package": "Parchment",
"repositoryURL": "https://github.com/rechsteiner/Parchment",
"state": {
"branch": null,
"revision": "86146bd617ffd8f3dec04c4ee75631fd4f75ea3f",
"version": "2.3.0"
}
}
]
},
"version": 1
}
......@@ -67,5 +67,17 @@ class DemoViewController: BaseViewController {
// Do any additional setup after loading the view.
}
convenience init(title: String) {
self.init(title: title, content: "")
}
init(title: String, content: String) {
super.init(nibName: nil, bundle: nil)
self.title = title
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
import UIKit
extension UIView {
func constrainCentered(_ subview: UIView) {
subview.translatesAutoresizingMaskIntoConstraints = false
let verticalContraint = NSLayoutConstraint(
item: subview,
attribute: .centerY,
relatedBy: .equal,
toItem: self,
attribute: .centerY,
multiplier: 1.0,
constant: 0)
let horizontalContraint = NSLayoutConstraint(
item: subview,
attribute: .centerX,
relatedBy: .equal,
toItem: self,
attribute: .centerX,
multiplier: 1.0,
constant: 0)
let heightContraint = NSLayoutConstraint(
item: subview,
attribute: .height,
relatedBy: .equal,
toItem: nil,
attribute: .notAnAttribute,
multiplier: 1.0,
constant: subview.frame.height)
let widthContraint = NSLayoutConstraint(
item: subview,
attribute: .width,
relatedBy: .equal,
toItem: nil,
attribute: .notAnAttribute,
multiplier: 1.0,
constant: subview.frame.width)
addConstraints([
horizontalContraint,
verticalContraint,
heightContraint,
widthContraint])
}
func constrainToEdges(_ subview: UIView) {
subview.translatesAutoresizingMaskIntoConstraints = false
let topContraint = NSLayoutConstraint(
item: subview,
attribute: .top,
relatedBy: .equal,
toItem: self,
attribute: .top,
multiplier: 1.0,
constant: 0)
let bottomConstraint = NSLayoutConstraint(
item: subview,
attribute: .bottom,
relatedBy: .equal,
toItem: self,
attribute: .bottom,
multiplier: 1.0,
constant: 0)
let leadingContraint = NSLayoutConstraint(
item: subview,
attribute: .leading,
relatedBy: .equal,
toItem: self,
attribute: .leading,
multiplier: 1.0,
constant: 0)
let trailingContraint = NSLayoutConstraint(
item: subview,
attribute: .trailing,
relatedBy: .equal,
toItem: self,
attribute: .trailing,
multiplier: 1.0,
constant: 0)
addConstraints([
topContraint,
bottomConstraint,
leadingContraint,
trailingContraint])
}
}
......@@ -69,7 +69,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UITabBarControllerDeleg
let v1 = OrderListViewController()
let v2 = GoodsManageListVC()
let v3 = DemoViewController()
let v3 = LoginViewController()
let v4 = WarehoseMangementListVC()
let v5 = PersonCenterViewController()
......
<?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="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......
<?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="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<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"/>
......
<?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="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<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"/>
......
<?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="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<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"/>
......
<?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="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<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"/>
......@@ -169,10 +169,10 @@
<color red="0.27450980392156865" green="0.5607843137254902" blue="0.88627450980392153" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="标题字颜色">
<color red="0.1803921568627451" green="0.1803921568627451" blue="0.1803921568627451" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.18000000715255737" green="0.18000000715255737" blue="0.18000000715255737" 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"/>
<color red="0.40000000596046448" green="0.40000000596046448" blue="0.40000000596046448" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
<?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="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<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"/>
......@@ -109,7 +109,7 @@
<image name="bianji" width="17" height="16.5"/>
<image name="shanchu" width="17" height="17.5"/>
<namedColor name="标题字颜色">
<color red="0.1803921568627451" green="0.1803921568627451" blue="0.1803921568627451" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<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"/>
......
<?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="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<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"/>
......
<?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="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<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"/>
......
//
// OrderListVC.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/4/26.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
import ViewAnimator
class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSource {
var selectData:String = ""{
didSet{
print("筛选条件=---")
}
}
var dataArr:Array<Any> = [] {
didSet{
tableV.reloadData()
}
}
override func viewDidLoad() {
super.viewDidLoad()
setTabv()
}
convenience init(title: String) {
self.init(title: title, content: "")
}
init(title: String, content: String) {
super.init(nibName: nil, bundle: nil)
self.title = title
print("ttit===\(title)")
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
var tableV :UITableView!
var tableSearchV :UITableView! = nil
private let animations = [AnimationType.from(direction: .bottom, offset: 150*glscale)]
func setTabv() {
tableV = UITableView()
view.addSubview(tableV);
tableV.snp.makeConstraints { (make) in
make.top.left.right.bottom.equalToSuperview()
}
tableV.backgroundColor = UIColor.init(named: "app底色")
tableV.delegate = self
tableV.dataSource = self
tableV.separatorStyle = .none
tableV?.register(UINib(nibName: "DaiQueRenCell", bundle: nil), forCellReuseIdentifier: "DaiQueRenCell")
tableV.performBatchUpdates({
UIView.animate(views: self.tableV!.visibleCells,
animations: self.animations, completion: {
})
}, completion: nil)
let footerTbV = UIView(frame: CGRect(x: 0, y: 0, width: view.frame.size.width, height: 15*glscale))
footerTbV.backgroundColor = UIColor.init(named: "app底色")
tableV.tableFooterView = footerTbV
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return dataArr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "DaiQueRenCell") as! DaiQueRenCell
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print(indexPath)
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 214*glscale
}
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
<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="OrderListVC" customModuleProvider="target">
<connections>
<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="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
</view>
</objects>
</document>
......@@ -7,14 +7,33 @@
//
import UIKit
import Parchment
class OrderListViewController: BaseViewController ,UISearchBarDelegate, SearchBarViewDelegate{
class OrderListViewController: BaseViewController ,UISearchBarDelegate, SearchBarViewDelegate, PagingViewControllerDelegate{
fileprivate let cities = [
"全部",
"待确认",
"待付款",
"待发货",
"已发货",
"退款/货",
"已取消"
]
let viewControllers = [
OrderListVC(title: "全部"),
OrderListVC(title: "待确认"),
OrderListVC(title: "待付款"),
OrderListVC(title: "待发货"),
OrderListVC(title: "已发货"),
OrderListVC(title: "退款/货"),
OrderListVC(title: "已取消")
]
@IBOutlet weak var contentView: UIView!
@IBOutlet weak var searchBgView: UIView!
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = UIColor.init(named: "白色背景色")
//searchbar
let searchBr = SearchBarView.init()
......@@ -30,11 +49,31 @@ class OrderListViewController: BaseViewController ,UISearchBarDelegate, SearchBa
searchBr.delegate = self
searchBr.delegateL = self
//头部滚动视图
let pagingViewController = PagingViewController(viewControllers: viewControllers)
pagingViewController.indicatorColor = UIColor.init(named: "蓝色字体颜色")!
pagingViewController.menuItemSize = .fixed(width: 0, height: 44*glscale)
pagingViewController.font = UIFont.systemFont(ofSize: 13)
pagingViewController.selectedFont = UIFont.systemFont(ofSize: 13)
pagingViewController.textColor = UIColor.init(named: "灰色字体颜色")!
pagingViewController.selectedTextColor = UIColor.init(named: "蓝色字体颜色")!
pagingViewController.delegate = self
pagingViewController.dataSource = self
pagingViewController.sizeDelegate = self
addChild(pagingViewController)
contentView.addSubview(pagingViewController.view)
contentView.constrainToEdges(pagingViewController.view)
pagingViewController.didMove(toParent: self)
}
//MARK:--搜索按钮代理
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
print("点击搜索进行--")
searchBar.resignFirstResponder()
for vc in viewControllers {
vc.selectData = "123"
}
}
//MARK:--取消搜索代理
func clearSearchAction() {
......@@ -44,7 +83,59 @@ class OrderListViewController: BaseViewController ,UISearchBarDelegate, SearchBa
//MARK:--筛选
@IBAction func SelectOtherAction(_ sender: UIButton) {
print("筛选")
}
}
var selectIndex = 0
func pagingViewController(_ pagingViewController: PagingViewController, didScrollToItem pagingItem: PagingItem, startingViewController: UIViewController?, destinationViewController: UIViewController, transitionSuccessful: Bool) {
guard let item = pagingItem as? PagingIndexItem else { return}
print("滚动至vc\(item.index)")
if selectIndex != item.index {
selectIndex = item.index
let vc = destinationViewController as! OrderListVC
vc.dataArr = ["","","",""]
}
}
}
extension OrderListViewController: PagingViewControllerDataSource {
func pagingViewController(_: PagingViewController, pagingItemAt index: Int) -> PagingItem {
return PagingIndexItem(index: index, title: cities[index])
}
func pagingViewController(_: PagingViewController, viewControllerAt index: Int) -> UIViewController {
return viewControllers[index]
}
func numberOfViewControllers(in pagingViewController: PagingViewController) -> Int {
return cities.count
}
}
extension OrderListViewController: PagingViewControllerSizeDelegate {
func pagingViewController(_ pagingViewController: PagingViewController, widthForPagingItem pagingItem: PagingItem, isSelected: Bool) -> CGFloat {
guard let item = pagingItem as? PagingIndexItem else { return 0 }
let insets = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20)
let size = CGSize(width: CGFloat.greatestFiniteMagnitude, height: pagingViewController.options.menuItemSize.height)
let attributes = [NSAttributedString.Key.font: pagingViewController.options.font]
let rect = item.title.boundingRect(with: size,
options: .usesLineFragmentOrigin,
attributes: attributes,
context: nil)
let width = ceil(rect.width) + insets.left + insets.right
if isSelected {
return width * 1.5
} else {
return width
}
}
}
......@@ -10,6 +10,7 @@
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="OrderListViewController" customModule="GeliBusinessPlatform" customModuleProvider="target">
<connections>
<outlet property="contentView" destination="gk3-xb-88Q" id="Mmc-gK-QV8"/>
<outlet property="searchBgView" destination="f4t-Fn-Swl" id="yJO-4i-XHP"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
......@@ -26,13 +27,6 @@
<constraint firstAttribute="height" constant="45" id="yth-ne-PfG"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="d6S-47-95p">
<rect key="frame" x="0.0" y="45" width="375" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="R16-1j-J2i"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oFn-kE-fo4">
<rect key="frame" x="320" y="7.5" width="55" height="30"/>
<state key="normal" title="筛选"/>
......@@ -40,29 +34,36 @@
<action selector="SelectOtherAction:" destination="-1" eventType="touchUpInside" id="Q40-3H-hF7"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AJr-GA-sNP" userLabel="ContentView">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ETb-BZ-IdF">
<rect key="frame" x="0.0" y="45" width="375" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="tRC-ci-8it"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gk3-xb-88Q">
<rect key="frame" x="0.0" y="46" width="375" height="621"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="AJr-GA-sNP" secondAttribute="bottom" id="1rU-A2-zWR"/>
<constraint firstItem="d6S-47-95p" firstAttribute="top" secondItem="f4t-Fn-Swl" secondAttribute="bottom" id="6tv-EI-bOb"/>
<constraint firstItem="AJr-GA-sNP" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="7Pf-an-7AK"/>
<constraint firstItem="AJr-GA-sNP" firstAttribute="top" secondItem="d6S-47-95p" secondAttribute="bottom" id="8oM-LO-1dx"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="AJr-GA-sNP" secondAttribute="trailing" id="H7A-7a-u3D"/>
<constraint firstItem="gk3-xb-88Q" firstAttribute="top" secondItem="ETb-BZ-IdF" secondAttribute="bottom" id="99k-0E-t0t"/>
<constraint firstItem="ETb-BZ-IdF" firstAttribute="top" secondItem="f4t-Fn-Swl" secondAttribute="bottom" id="JQs-Tb-3vz"/>
<constraint firstItem="oFn-kE-fo4" firstAttribute="leading" secondItem="f4t-Fn-Swl" secondAttribute="trailing" id="Kr8-A6-MhE"/>
<constraint firstItem="d6S-47-95p" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="WkW-vN-bml"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="gk3-xb-88Q" secondAttribute="bottom" id="Ucd-qW-0hB"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="f4t-Fn-Swl" secondAttribute="trailing" constant="55" id="Y4X-G1-KGG"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="d6S-47-95p" secondAttribute="trailing" id="abQ-sP-NDf"/>
<constraint firstItem="f4t-Fn-Swl" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="gm8-Ze-Ng2"/>
<constraint firstItem="oFn-kE-fo4" firstAttribute="centerY" secondItem="f4t-Fn-Swl" secondAttribute="centerY" id="h63-Ae-220"/>
<constraint firstItem="ETb-BZ-IdF" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="kgG-Ju-oHW"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="oFn-kE-fo4" secondAttribute="trailing" id="lAN-Gh-zIz"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="ETb-BZ-IdF" secondAttribute="trailing" id="lly-Xe-K7G"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="gk3-xb-88Q" secondAttribute="trailing" id="tS6-V1-gaC"/>
<constraint firstItem="f4t-Fn-Swl" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="ytf-De-vhY"/>
<constraint firstItem="gk3-xb-88Q" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="zmL-6P-JFb"/>
</constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="132" y="154"/>
<point key="canvasLocation" x="132" y="153.37331334332833"/>
</view>
</objects>
<resources>
......
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