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

新增订单列表基本的筛选视图

parent 66a12e0e
...@@ -110,6 +110,8 @@ ...@@ -110,6 +110,8 @@
F950FDA92451613500C40530 /* GetMobileModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F950FDA82451613500C40530 /* GetMobileModel.swift */; }; F950FDA92451613500C40530 /* GetMobileModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F950FDA82451613500C40530 /* GetMobileModel.swift */; };
F950FDAB2451634B00C40530 /* LocationGeliPayModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F950FDAA2451634B00C40530 /* LocationGeliPayModel.swift */; }; F950FDAB2451634B00C40530 /* LocationGeliPayModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F950FDAA2451634B00C40530 /* LocationGeliPayModel.swift */; };
F950FDAD245163E500C40530 /* GoodsListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F950FDAC245163E500C40530 /* GoodsListModel.swift */; }; F950FDAD245163E500C40530 /* GoodsListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F950FDAC245163E500C40530 /* GoodsListModel.swift */; };
F950FDB12451811A00C40530 /* TitleAndSelCalendarView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F950FDB02451811A00C40530 /* TitleAndSelCalendarView.xib */; };
F950FDB32451820D00C40530 /* TitleAndSelCalendarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F950FDB22451820D00C40530 /* TitleAndSelCalendarView.swift */; };
F95D9B5024484FAE0080D6E3 /* GeliAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F95D9B4F24484FAE0080D6E3 /* GeliAlertView.xib */; }; F95D9B5024484FAE0080D6E3 /* GeliAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F95D9B4F24484FAE0080D6E3 /* GeliAlertView.xib */; };
F95D9B522448530E0080D6E3 /* GeliAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F95D9B512448530E0080D6E3 /* GeliAlertView.swift */; }; F95D9B522448530E0080D6E3 /* GeliAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F95D9B512448530E0080D6E3 /* GeliAlertView.swift */; };
F95D9CA424493E840080D6E3 /* ShopInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F95D9CA224493E840080D6E3 /* ShopInfoViewController.swift */; }; F95D9CA424493E840080D6E3 /* ShopInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F95D9CA224493E840080D6E3 /* ShopInfoViewController.swift */; };
...@@ -119,6 +121,8 @@ ...@@ -119,6 +121,8 @@
F961D26B24500FF6007FBE70 /* HeaderSelectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F961D26A24500FF6007FBE70 /* HeaderSelectView.swift */; }; F961D26B24500FF6007FBE70 /* HeaderSelectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F961D26A24500FF6007FBE70 /* HeaderSelectView.swift */; };
F961D26F245015D6007FBE70 /* SelectContentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F961D26E245015D6007FBE70 /* SelectContentView.xib */; }; F961D26F245015D6007FBE70 /* SelectContentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F961D26E245015D6007FBE70 /* SelectContentView.xib */; };
F961D271245016B7007FBE70 /* SelectContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F961D270245016B7007FBE70 /* SelectContentView.swift */; }; F961D271245016B7007FBE70 /* SelectContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F961D270245016B7007FBE70 /* SelectContentView.swift */; };
F961D27524503CCF007FBE70 /* OrderSelectMoreView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F961D27424503CCF007FBE70 /* OrderSelectMoreView.xib */; };
F961D27724503F51007FBE70 /* OrderSelectMoreView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F961D27624503F51007FBE70 /* OrderSelectMoreView.swift */; };
F969BF07244EC38000C79953 /* GoodsCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F969BF05244EC38000C79953 /* GoodsCollectionViewCell.swift */; }; F969BF07244EC38000C79953 /* GoodsCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F969BF05244EC38000C79953 /* GoodsCollectionViewCell.swift */; };
F969BF08244EC38000C79953 /* GoodsCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F969BF06244EC38000C79953 /* GoodsCollectionViewCell.xib */; }; F969BF08244EC38000C79953 /* GoodsCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F969BF06244EC38000C79953 /* GoodsCollectionViewCell.xib */; };
F969BF1E244EE67900C79953 /* GoodsManageListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F969BF1C244EE67900C79953 /* GoodsManageListVC.swift */; }; F969BF1E244EE67900C79953 /* GoodsManageListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F969BF1C244EE67900C79953 /* GoodsManageListVC.swift */; };
...@@ -264,6 +268,8 @@ ...@@ -264,6 +268,8 @@
F950FDA82451613500C40530 /* GetMobileModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetMobileModel.swift; sourceTree = "<group>"; }; F950FDA82451613500C40530 /* GetMobileModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetMobileModel.swift; sourceTree = "<group>"; };
F950FDAA2451634B00C40530 /* LocationGeliPayModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationGeliPayModel.swift; sourceTree = "<group>"; }; F950FDAA2451634B00C40530 /* LocationGeliPayModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationGeliPayModel.swift; sourceTree = "<group>"; };
F950FDAC245163E500C40530 /* GoodsListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoodsListModel.swift; sourceTree = "<group>"; }; F950FDAC245163E500C40530 /* GoodsListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoodsListModel.swift; sourceTree = "<group>"; };
F950FDB02451811A00C40530 /* TitleAndSelCalendarView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TitleAndSelCalendarView.xib; sourceTree = "<group>"; };
F950FDB22451820D00C40530 /* TitleAndSelCalendarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitleAndSelCalendarView.swift; sourceTree = "<group>"; };
F95D9B4F24484FAE0080D6E3 /* GeliAlertView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GeliAlertView.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>"; }; 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>"; }; F95D9CA224493E840080D6E3 /* ShopInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShopInfoViewController.swift; sourceTree = "<group>"; };
...@@ -273,6 +279,8 @@ ...@@ -273,6 +279,8 @@
F961D26A24500FF6007FBE70 /* HeaderSelectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeaderSelectView.swift; sourceTree = "<group>"; }; F961D26A24500FF6007FBE70 /* HeaderSelectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeaderSelectView.swift; sourceTree = "<group>"; };
F961D26E245015D6007FBE70 /* SelectContentView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SelectContentView.xib; sourceTree = "<group>"; }; F961D26E245015D6007FBE70 /* SelectContentView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SelectContentView.xib; sourceTree = "<group>"; };
F961D270245016B7007FBE70 /* SelectContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectContentView.swift; sourceTree = "<group>"; }; F961D270245016B7007FBE70 /* SelectContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectContentView.swift; sourceTree = "<group>"; };
F961D27424503CCF007FBE70 /* OrderSelectMoreView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OrderSelectMoreView.xib; sourceTree = "<group>"; };
F961D27624503F51007FBE70 /* OrderSelectMoreView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderSelectMoreView.swift; sourceTree = "<group>"; };
F969BF05244EC38000C79953 /* GoodsCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoodsCollectionViewCell.swift; sourceTree = "<group>"; }; F969BF05244EC38000C79953 /* GoodsCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoodsCollectionViewCell.swift; sourceTree = "<group>"; };
F969BF06244EC38000C79953 /* GoodsCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GoodsCollectionViewCell.xib; sourceTree = "<group>"; }; F969BF06244EC38000C79953 /* GoodsCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GoodsCollectionViewCell.xib; sourceTree = "<group>"; };
F969BF1C244EE67900C79953 /* GoodsManageListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoodsManageListVC.swift; sourceTree = "<group>"; }; F969BF1C244EE67900C79953 /* GoodsManageListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoodsManageListVC.swift; sourceTree = "<group>"; };
...@@ -548,6 +556,8 @@ ...@@ -548,6 +556,8 @@
E09B03AC2445B0B200211A51 /* View */ = { E09B03AC2445B0B200211A51 /* View */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
F950FDAF245171E000C40530 /* TimeSelectView */,
F961D273245037CA007FBE70 /* MoreBtnView */,
F961D267244FFD47007FBE70 /* HeaderSelectView */, F961D267244FFD47007FBE70 /* HeaderSelectView */,
F961D25E244FCE55007FBE70 /* SearchView */, F961D25E244FCE55007FBE70 /* SearchView */,
F969BF04244EC27E00C79953 /* CollectionCell */, F969BF04244EC27E00C79953 /* CollectionCell */,
...@@ -561,6 +571,7 @@ ...@@ -561,6 +571,7 @@
E09B03AD2445B0BA00211A51 /* ViewController */ = { E09B03AD2445B0BA00211A51 /* ViewController */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
F961D2722450373B007FBE70 /* 订单列表 */,
F969BF17244EE42700C79953 /* 商品管理 */, F969BF17244EE42700C79953 /* 商品管理 */,
E0336DD2244EC3CA00380BE9 /* 新增规格 */, E0336DD2244EC3CA00380BE9 /* 新增规格 */,
E022E131244D80EA00FEF5F7 /* 订单详情 */, E022E131244D80EA00FEF5F7 /* 订单详情 */,
...@@ -742,6 +753,13 @@ ...@@ -742,6 +753,13 @@
path = Cell; path = Cell;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
F950FDAF245171E000C40530 /* TimeSelectView */ = {
isa = PBXGroup;
children = (
);
path = TimeSelectView;
sourceTree = "<group>";
};
F95D9B4E24484F140080D6E3 /* AlertView */ = { F95D9B4E24484F140080D6E3 /* AlertView */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -779,6 +797,24 @@ ...@@ -779,6 +797,24 @@
path = HeaderSelectView; path = HeaderSelectView;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
F961D2722450373B007FBE70 /* 订单列表 */ = {
isa = PBXGroup;
children = (
);
path = "订单列表";
sourceTree = "<group>";
};
F961D273245037CA007FBE70 /* MoreBtnView */ = {
isa = PBXGroup;
children = (
F961D27424503CCF007FBE70 /* OrderSelectMoreView.xib */,
F961D27624503F51007FBE70 /* OrderSelectMoreView.swift */,
F950FDB02451811A00C40530 /* TitleAndSelCalendarView.xib */,
F950FDB22451820D00C40530 /* TitleAndSelCalendarView.swift */,
);
path = MoreBtnView;
sourceTree = "<group>";
};
F969BF04244EC27E00C79953 /* CollectionCell */ = { F969BF04244EC27E00C79953 /* CollectionCell */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -912,6 +948,7 @@ ...@@ -912,6 +948,7 @@
E09B03C12445B96500211A51 /* FgPassViewController.xib in Resources */, E09B03C12445B96500211A51 /* FgPassViewController.xib in Resources */,
E0D197C7244845FD002B080C /* PersonCenterViewController.xib in Resources */, E0D197C7244845FD002B080C /* PersonCenterViewController.xib in Resources */,
E02DDD83244FD15B00ABB707 /* TitleAndSwitchHeaderView.xib in Resources */, E02DDD83244FD15B00ABB707 /* TitleAndSwitchHeaderView.xib in Resources */,
F950FDB12451811A00C40530 /* TitleAndSelCalendarView.xib in Resources */,
E0B6036F244D376900A56B38 /* KuWeiCell.xib in Resources */, E0B6036F244D376900A56B38 /* KuWeiCell.xib in Resources */,
E01C26B72446AF3100ADCC70 /* DemoViewController.xib in Resources */, E01C26B72446AF3100ADCC70 /* DemoViewController.xib in Resources */,
E0C4F4BA244EEA7C00CC7E2F /* JiaTiJiaCell.xib in Resources */, E0C4F4BA244EEA7C00CC7E2F /* JiaTiJiaCell.xib in Resources */,
...@@ -934,6 +971,7 @@ ...@@ -934,6 +971,7 @@
E0DDCB19244AE2AC00DF54C7 /* XiuGaiYuShouJiaViewController.xib in Resources */, E0DDCB19244AE2AC00DF54C7 /* XiuGaiYuShouJiaViewController.xib in Resources */,
F95D9CA524493E840080D6E3 /* ShopInfoViewController.xib in Resources */, F95D9CA524493E840080D6E3 /* ShopInfoViewController.xib in Resources */,
F961D26F245015D6007FBE70 /* SelectContentView.xib in Resources */, F961D26F245015D6007FBE70 /* SelectContentView.xib in Resources */,
F961D27524503CCF007FBE70 /* OrderSelectMoreView.xib in Resources */,
E01C26B12446989700ADCC70 /* Interface_Z.plist in Resources */, E01C26B12446989700ADCC70 /* Interface_Z.plist in Resources */,
F969BF08244EC38000C79953 /* GoodsCollectionViewCell.xib in Resources */, F969BF08244EC38000C79953 /* GoodsCollectionViewCell.xib in Resources */,
E0D4166524483058008DCAB4 /* ChangePassViewController.xib in Resources */, E0D4166524483058008DCAB4 /* ChangePassViewController.xib in Resources */,
...@@ -1039,6 +1077,7 @@ ...@@ -1039,6 +1077,7 @@
E0516F822448086700E373CE /* MsgCenterCell.swift in Sources */, E0516F822448086700E373CE /* MsgCenterCell.swift in Sources */,
F950FDA32451438A00C40530 /* AdminInfoModel.swift in Sources */, F950FDA32451438A00C40530 /* AdminInfoModel.swift in Sources */,
E0D197D5244860B1002B080C /* BlueToothCell.swift in Sources */, E0D197D5244860B1002B080C /* BlueToothCell.swift in Sources */,
F961D27724503F51007FBE70 /* OrderSelectMoreView.swift in Sources */,
F95D9B522448530E0080D6E3 /* GeliAlertView.swift in Sources */, F95D9B522448530E0080D6E3 /* GeliAlertView.swift in Sources */,
E0D197BB2448431C002B080C /* BabyCallback.m in Sources */, E0D197BB2448431C002B080C /* BabyCallback.m in Sources */,
F961D26B24500FF6007FBE70 /* HeaderSelectView.swift in Sources */, F961D26B24500FF6007FBE70 /* HeaderSelectView.swift in Sources */,
...@@ -1070,6 +1109,7 @@ ...@@ -1070,6 +1109,7 @@
E0DDCB1D244AE81800DF54C7 /* GuanLianKeHuCell.swift in Sources */, E0DDCB1D244AE81800DF54C7 /* GuanLianKeHuCell.swift in Sources */,
E0D197BF2448431C002B080C /* BabyBluetooth.m in Sources */, E0D197BF2448431C002B080C /* BabyBluetooth.m in Sources */,
E0D4165F24482AAF008DCAB4 /* AccountViewController.swift in Sources */, E0D4165F24482AAF008DCAB4 /* AccountViewController.swift in Sources */,
F950FDB32451820D00C40530 /* TitleAndSelCalendarView.swift in Sources */,
E01C26B62446AF3100ADCC70 /* DemoViewController.swift in Sources */, E01C26B62446AF3100ADCC70 /* DemoViewController.swift in Sources */,
E0A7548A244A8F0F00A84B67 /* CheckWareHourseViewController.swift in Sources */, E0A7548A244A8F0F00A84B67 /* CheckWareHourseViewController.swift in Sources */,
F9023F62244999F500DD5A63 /* WarehoseMangementCell.swift in Sources */, F9023F62244999F500DD5A63 /* WarehoseMangementCell.swift in Sources */,
......
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x69",
"green" : "0x69",
"red" : "0x69"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xEA",
"green" : "0xDF",
"red" : "0xD6"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
//
// OrderSelectMoreView.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/4/22.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
class OrderSelectMoreView: UIView {
var contentView:UIView!
@IBOutlet weak var contentWidht: NSLayoutConstraint!
@IBOutlet weak var contentHeight: NSLayoutConstraint!
@IBOutlet weak var moreBgView: UIView!
@IBAction func colseByBlackTap(_ sender: UITapGestureRecognizer) {
self.removeFromSuperview()
}
//初始化时将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()
}
setUI()
}
// /初始化时将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()
}
setUI()
}
//加载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
}
func setUI() {
let timeTilelV = TitleAndSelCalendarView()
moreBgView.addSubview(timeTilelV)
timeTilelV.snp.makeConstraints { (make) in
make.left.top.equalTo(15*glscale)
make.right.equalTo(-135*glscale)
make.height.equalTo(60*glscale)
}
//分界线1
let line1 = UIView()
line1.backgroundColor = UIColor.init(named: "灰色分界线")
moreBgView.addSubview(line1)
line1.snp.makeConstraints { (make) in
make.left.right.equalTo(0)
make.height.equalTo(1)
make.top.equalTo(timeTilelV.snp_bottom).offset(15*glscale)
}
let payV = addTitleAndMoreBtn(title: "支付状态", arrStr: ["未付款","欠款","已付款","月结","已退款"])
moreBgView.addSubview(payV)
payV.snp.makeConstraints { (make) in
make.left.equalTo(15*glscale)
make.top.equalTo(line1.snp_bottom).offset(15*glscale)
make.right.equalTo(0)
make.height.equalTo(100*glscale)
}
//分界线2
let line2 = UIView()
line2.backgroundColor = UIColor.init(named: "灰色分界线")
moreBgView.addSubview(line2)
line2.snp.makeConstraints { (make) in
make.left.right.equalTo(0)
make.height.equalTo(1)
make.top.equalTo(payV.snp_bottom).offset(15*glscale)
}
let typeV = addTitleAndMoreBtn(title: "下单方式", arrStr: ["自助下单","销售下单"])
moreBgView.addSubview(typeV)
typeV.snp.makeConstraints { (make) in
make.left.equalTo(15*glscale)
make.top.equalTo(line2.snp_bottom).offset(15*glscale)
make.right.equalTo(0)
make.height.equalTo(60*glscale)
}
//分界线3
let line3 = UIView()
line3.backgroundColor = UIColor.init(named: "灰色分界线")
moreBgView.addSubview(line3)
line3.snp.makeConstraints { (make) in
make.left.right.equalTo(0)
make.height.equalTo(1)
make.top.equalTo(typeV.snp_bottom).offset(15*glscale)
}
let statusV = addTitleAndMoreBtn(title: "商品配送情况", arrStr: ["未发货","已发货","已收货","已退货"])
moreBgView.addSubview(statusV)
statusV.snp.makeConstraints { (make) in
make.left.equalTo(15*glscale)
make.top.equalTo(line3.snp_bottom).offset(15*glscale)
make.right.equalTo(0)
make.height.equalTo(60*glscale)
}
contentWidht.constant = 375*glscale
contentHeight.constant = 400*glscale
}
//MARK--标题和按钮多的情况1
func addTitleAndMoreBtn(title:String,arrStr:[String]) -> UIView {
let conView = UIView()
let titleLbl = UILabel()
titleLbl.textColor = UIColor.init(named: "标题字颜色")
titleLbl.font = UIFont.systemFont(ofSize: 13)
conView.addSubview(titleLbl)
titleLbl.snp.makeConstraints { (make) in
make.left.top.equalTo(0)
}
titleLbl.text = title
weak var btn:UIButton? = nil
for i in 0 ..< arrStr.count {
let str = arrStr[i]
let selectBtn = UIButton(type: .custom)
conView.addSubview(selectBtn)
selectBtn.setTitle(str, for: .normal)
selectBtn.titleLabel?.font = UIFont.systemFont(ofSize: 13)
selectBtn.setTitleColor(UIColor.init(named: "多选按钮字体颜色"), for: .normal)
selectBtn.backgroundColor = UIColor.init(named: "多选按钮背景颜色")
selectBtn.layer.cornerRadius = 3
selectBtn.snp.makeConstraints { (make) in
if i < 4 {
make.left.equalTo(CGFloat(CGFloat(i * (73 + 15)) * glscale))
make.top.equalTo(titleLbl.snp_bottom).offset(10*glscale)
btn = selectBtn
}else{
make.left.equalTo(CGFloat(CGFloat((i - 4) * (73 + 15)) * glscale))
make.top.equalTo(btn!.snp_bottom).offset(10*glscale)
}
make.width.equalTo(73*glscale)
make.height.equalTo(30*glscale)
}
selectBtn.addTarget(self, action: #selector(selectBtnAction(sender:)), for: .touchUpInside)
}
return conView
}
@objc func selectBtnAction(sender:UIButton) {
sender.isSelected = !sender.isSelected
if sender.isSelected {
sender.setTitleColor(UIColor.init(named: "白色背景色"), for: .normal)
sender.backgroundColor = UIColor.init(named: "蓝色字体颜色")
}else{
sender.setTitleColor(UIColor.init(named: "多选按钮字体颜色"), for: .normal)
sender.backgroundColor = UIColor.init(named: "多选按钮背景颜色")
}
}
}
<?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">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<capability name="Named colors" 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="OrderSelectMoreView">
<connections>
<outlet property="contentHeight" destination="MoJ-QU-lc9" id="A6E-16-iib"/>
<outlet property="contentWidht" destination="Maq-yV-LoF" id="OFR-Dg-Djw"/>
<outlet property="moreBgView" destination="8Ir-pU-hYD" id="e2J-vs-M4j"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clipsSubviews="YES" contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XxT-ef-JCa">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<color key="backgroundColor" name="提示视图背景色"/>
<gestureRecognizers/>
<connections>
<outletCollection property="gestureRecognizers" destination="eFW-7l-Ug1" appends="YES" id="rGr-pX-vNO"/>
</connections>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jdd-MN-xKa">
<rect key="frame" x="0.0" y="-5" width="375" height="450"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Aa2-Gq-Tga">
<rect key="frame" x="0.0" y="399" width="375" height="1"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="kEr-v0-j2o"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZjA-JG-8Bi">
<rect key="frame" x="187" y="400" width="1" height="50"/>
<color key="backgroundColor" name="灰色分界线"/>
<constraints>
<constraint firstAttribute="width" constant="1" id="BB6-25-bs0"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eqJ-Ca-ryF">
<rect key="frame" x="0.0" y="400" width="187" height="50"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="重置">
<color key="titleColor" name="灰色字体颜色"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sTi-CD-uRH">
<rect key="frame" x="188" y="400" width="187" height="50"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="确定">
<color key="titleColor" name="蓝色字体颜色"/>
</state>
</button>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zOf-Po-PY2">
<rect key="frame" x="0.0" y="5" width="375" height="394"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8Ir-pU-hYD" userLabel="contentView">
<rect key="frame" x="0.0" y="0.0" width="375" height="400"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstAttribute="width" constant="375" id="Maq-yV-LoF">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isAdaptateScreen" value="YES"/>
</userDefinedRuntimeAttributes>
</constraint>
<constraint firstAttribute="height" constant="400" id="MoJ-QU-lc9">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isAdaptateScreen" value="YES"/>
</userDefinedRuntimeAttributes>
</constraint>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="8Ir-pU-hYD" secondAttribute="trailing" id="2Nc-Yd-0C6"/>
<constraint firstItem="8Ir-pU-hYD" firstAttribute="leading" secondItem="zOf-Po-PY2" secondAttribute="leading" id="LMi-lF-UC7"/>
<constraint firstItem="8Ir-pU-hYD" firstAttribute="top" secondItem="zOf-Po-PY2" secondAttribute="top" id="QuN-Os-DK1"/>
<constraint firstAttribute="bottom" secondItem="8Ir-pU-hYD" secondAttribute="bottom" constant="1" id="ULm-fK-ffI"/>
</constraints>
<viewLayoutGuide key="contentLayoutGuide" id="Ez2-0F-GmD"/>
<viewLayoutGuide key="frameLayoutGuide" id="65K-Ih-2xq"/>
</scrollView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="ZjA-JG-8Bi" firstAttribute="leading" secondItem="eqJ-Ca-ryF" secondAttribute="trailing" id="1dD-kq-jUo"/>
<constraint firstAttribute="trailing" secondItem="Aa2-Gq-Tga" secondAttribute="trailing" id="3sp-xm-trK"/>
<constraint firstItem="ZjA-JG-8Bi" firstAttribute="centerX" secondItem="jdd-MN-xKa" secondAttribute="centerX" id="5Gq-4q-G21"/>
<constraint firstAttribute="trailing" secondItem="sTi-CD-uRH" secondAttribute="trailing" id="6Te-mt-Haa"/>
<constraint firstAttribute="bottom" secondItem="sTi-CD-uRH" secondAttribute="bottom" id="6Xa-C7-gfS"/>
<constraint firstItem="eqJ-Ca-ryF" firstAttribute="top" secondItem="Aa2-Gq-Tga" secondAttribute="bottom" id="Bja-iy-hMM"/>
<constraint firstItem="sTi-CD-uRH" firstAttribute="top" secondItem="Aa2-Gq-Tga" secondAttribute="bottom" id="HnI-Vw-MPv"/>
<constraint firstAttribute="bottom" secondItem="ZjA-JG-8Bi" secondAttribute="bottom" id="MzQ-Dc-uZI"/>
<constraint firstAttribute="height" constant="450" id="Ox5-6L-Sdm">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isAdaptateScreen" value="YES"/>
</userDefinedRuntimeAttributes>
</constraint>
<constraint firstItem="Aa2-Gq-Tga" firstAttribute="top" secondItem="zOf-Po-PY2" secondAttribute="bottom" id="SR0-r1-Lex"/>
<constraint firstAttribute="trailing" secondItem="zOf-Po-PY2" secondAttribute="trailing" id="VGe-bY-PQi"/>
<constraint firstItem="zOf-Po-PY2" firstAttribute="top" secondItem="jdd-MN-xKa" secondAttribute="top" constant="5" id="VJX-NT-HKi"/>
<constraint firstItem="Aa2-Gq-Tga" firstAttribute="leading" secondItem="jdd-MN-xKa" secondAttribute="leading" id="eyE-Di-kPM"/>
<constraint firstItem="zOf-Po-PY2" firstAttribute="leading" secondItem="jdd-MN-xKa" secondAttribute="leading" id="gOh-nx-EqA"/>
<constraint firstAttribute="bottom" secondItem="eqJ-Ca-ryF" secondAttribute="bottom" id="khU-s2-oBA"/>
<constraint firstItem="ZjA-JG-8Bi" firstAttribute="top" secondItem="Aa2-Gq-Tga" secondAttribute="bottom" id="piN-ao-ymM"/>
<constraint firstItem="eqJ-Ca-ryF" firstAttribute="leading" secondItem="jdd-MN-xKa" secondAttribute="leading" id="qvT-NV-QHG"/>
<constraint firstAttribute="bottom" secondItem="Aa2-Gq-Tga" secondAttribute="bottom" constant="50" id="z8e-SX-0dd"/>
<constraint firstItem="sTi-CD-uRH" firstAttribute="leading" secondItem="ZjA-JG-8Bi" secondAttribute="trailing" id="z9s-k0-HhR"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="XxT-ef-JCa" secondAttribute="trailing" id="GO4-rR-Wdl"/>
<constraint firstAttribute="trailing" secondItem="jdd-MN-xKa" secondAttribute="trailing" id="LMC-6Y-0Ih"/>
<constraint firstItem="jdd-MN-xKa" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="-5" id="MJ3-pL-Gla"/>
<constraint firstItem="jdd-MN-xKa" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="bzD-SC-qgb"/>
<constraint firstItem="XxT-ef-JCa" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="ntA-VW-dzI"/>
<constraint firstAttribute="bottom" secondItem="XxT-ef-JCa" secondAttribute="bottom" id="vlS-ux-c66"/>
<constraint firstItem="XxT-ef-JCa" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="zTR-RI-W7W"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="-130.40000000000001" y="123.68815592203899"/>
</view>
<tapGestureRecognizer id="eFW-7l-Ug1">
<connections>
<action selector="colseByBlackTap:" destination="-1" id="rm2-C3-MXz"/>
</connections>
</tapGestureRecognizer>
</objects>
<resources>
<namedColor name="提示视图背景色">
<color red="0.1803921568627451" green="0.1803921568627451" blue="0.1803921568627451" alpha="0.5" 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>
<namedColor name="蓝色字体颜色">
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
//
// TitleAndSelCalendarView.swift
// GeliBusinessPlatform
//
// Created by 刘俊宏 on 2020/4/23.
// Copyright © 2020 junye lu. All rights reserved.
//
import Foundation
class TitleAndSelCalendarView: UIView {
var contentView:UIView!
@IBOutlet weak var timeLbl: UILabel!
@IBAction func btnAction(_ sender: UIButton) {
print("选择时间范围--")
}
//初始化时将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
}
}
<?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">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<capability name="Named colors" 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="TitleAndSelCalendarView">
<connections>
<outlet property="timeLbl" destination="AL5-PY-wu7" id="KF9-eb-w55"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="351" height="82"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="时间范围" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t9N-FQ-T0V">
<rect key="frame" x="0.0" y="0.0" width="54" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tF3-xB-o3j">
<rect key="frame" x="0.0" y="26" width="351" height="56"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="3"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" name="灰色字体颜色"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="btnAction:" destination="-1" eventType="touchUpInside" id="TcY-ul-ED0"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请选择时间范围" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AL5-PY-wu7">
<rect key="frame" x="10" y="46" width="331" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="AL5-PY-wu7" secondAttribute="trailing" constant="10" id="3Rt-oz-EVL"/>
<constraint firstAttribute="trailing" secondItem="tF3-xB-o3j" secondAttribute="trailing" id="RnM-SZ-e2J"/>
<constraint firstItem="tF3-xB-o3j" firstAttribute="top" secondItem="t9N-FQ-T0V" secondAttribute="bottom" constant="10" id="T28-Oe-3gB"/>
<constraint firstAttribute="bottom" secondItem="tF3-xB-o3j" secondAttribute="bottom" id="bUN-Hd-xhe"/>
<constraint firstItem="AL5-PY-wu7" firstAttribute="centerY" secondItem="tF3-xB-o3j" secondAttribute="centerY" id="h2j-KK-66H"/>
<constraint firstItem="t9N-FQ-T0V" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="l4s-0p-kRW"/>
<constraint firstItem="tF3-xB-o3j" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="m00-7k-Hac"/>
<constraint firstItem="t9N-FQ-T0V" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="uKV-ot-ztS"/>
<constraint firstItem="AL5-PY-wu7" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="vwR-p5-6CE"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="108" y="-26.986506746626688"/>
</view>
</objects>
<resources>
<namedColor name="标题字颜色">
<color red="0.1803921568627451" green="0.1803921568627451" blue="0.1803921568627451" 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>
...@@ -13,7 +13,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect ...@@ -13,7 +13,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
var collection : UICollectionView? = nil var collection : UICollectionView? = nil
var layout = UICollectionViewFlowLayout() var layout = UICollectionViewFlowLayout()
private let animations = [AnimationType.from(direction: .bottom, offset: 100.0)] private let animations = [AnimationType.from(direction: .bottom, offset: 100.0*glscale)]
private var items = [Any?]() private var items = [Any?]()
weak var showSelectV: SelectContentView! = nil weak var showSelectV: SelectContentView! = nil
...@@ -49,7 +49,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect ...@@ -49,7 +49,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
selectView.delegate = self selectView.delegate = self
selectV = selectView selectV = selectView
layout.headerReferenceSize = CGSize(width: 375, height: 50) layout.headerReferenceSize = CGSize(width: 375*glscale, height: 50*glscale)
self.collection = UICollectionView(frame: CGRect(x: 0, y: 0, width: 0, height: 0), collectionViewLayout: layout) self.collection = UICollectionView(frame: CGRect(x: 0, y: 0, width: 0, height: 0), collectionViewLayout: layout)
...@@ -85,6 +85,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect ...@@ -85,6 +85,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
//MARK:--新增触发 //MARK:--新增触发
@IBAction func addNewGoodsAction(_ sender: UIButton) { @IBAction func addNewGoodsAction(_ sender: UIButton) {
print("新增触发-") print("新增触发-")
} }
//MARK:--下拉视图各种代理 //MARK:--下拉视图各种代理
func showAction(sender: Int) { func showAction(sender: Int) {
...@@ -150,7 +151,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect ...@@ -150,7 +151,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
let headerV = collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "headerIdentifier", for: indexPath) let headerV = collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "headerIdentifier", for: indexPath)
let headerLbl = UILabel(frame: CGRect(x: 15, y: 10, width: 100, height: 20)) let headerLbl = UILabel(frame: CGRect(x: 15*glscale, y: 10*glscale, width: 100*glscale, height: 20*glscale))
headerLbl.text = "共x件商品" headerLbl.text = "共x件商品"
headerLbl.textColor = UIColor.init(named: "标题字颜色") headerLbl.textColor = UIColor.init(named: "标题字颜色")
headerLbl.font = UIFont.systemFont(ofSize: 13) headerLbl.font = UIFont.systemFont(ofSize: 13)
...@@ -158,7 +159,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect ...@@ -158,7 +159,7 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
return headerV return headerV
} }
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize { func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {
return CGSize.init(width: self.contentView.bounds.width, height: 30) return CGSize.init(width: self.contentView.bounds.width, height: 30*glscale)
} }
func numberOfSections(in collectionView: UICollectionView) -> Int { func numberOfSections(in collectionView: UICollectionView) -> Int {
...@@ -186,10 +187,10 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect ...@@ -186,10 +187,10 @@ class GoodsManageListVC: BaseViewController, UICollectionViewDelegate, UICollect
} }
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
return CGSize(width: 165, height: 283) return CGSize(width: 165*glscale, height: 283*glscale)
} }
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
return UIEdgeInsets(top: 15, left: 15, bottom: 15, right: 15) return UIEdgeInsets(top: 15*glscale, left: 15*glscale, bottom: 15*glscale, right: 15*glscale)
} }
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
print("选中===\(indexPath)") print("选中===\(indexPath)")
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<constraint firstItem="DIe-mL-vml" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="uCS-42-nlf"/> <constraint firstItem="DIe-mL-vml" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="uCS-42-nlf"/>
</constraints> </constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="133" y="153"/> <point key="canvasLocation" x="132" y="152.47376311844079"/>
</view> </view>
</objects> </objects>
<resources> <resources>
......
...@@ -20,8 +20,5 @@ class ShopInfoViewController: BaseViewController { ...@@ -20,8 +20,5 @@ class ShopInfoViewController: BaseViewController {
make.top.equalTo(NavCGRect.height) make.top.equalTo(NavCGRect.height)
make.left.bottom.right.equalTo(0) make.left.bottom.right.equalTo(0)
} }
// scrollHeight.constant = 2000;
// super.updateViewConstraints()
} }
} }
<?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="16096" 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"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<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"/>
...@@ -943,7 +943,7 @@ ...@@ -943,7 +943,7 @@
<color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.92941176470588238" green="0.92941176470588238" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="灰色字体颜色"> <namedColor name="灰色字体颜色">
<color red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="白色背景色"> <namedColor name="白色背景色">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
......
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