Commit deeb7bb0 authored by lujunye's avatar lujunye

分销管理商品搜索界面

parent 67686ee3
......@@ -273,6 +273,8 @@
E0AA3A92248F626400CBFC27 /* XinCaiGouViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0AA3A90248F626400CBFC27 /* XinCaiGouViewController.xib */; };
E0AD92E92550E50500D82C17 /* GYS_FX_Product_VC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0AD92E72550E50500D82C17 /* GYS_FX_Product_VC.swift */; };
E0AD92EA2550E50500D82C17 /* GYS_FX_Product_VC.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0AD92E82550E50500D82C17 /* GYS_FX_Product_VC.xib */; };
E0AD92F92550FD1500D82C17 /* GYS_FX_SearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0AD92F72550FD1500D82C17 /* GYS_FX_SearchViewController.swift */; };
E0AD92FA2550FD1500D82C17 /* GYS_FX_SearchViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0AD92F82550FD1500D82C17 /* GYS_FX_SearchViewController.xib */; };
E0B28DAC24D3B15E00997C69 /* HuoLaLaDiZhiCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0B28DAA24D3B15E00997C69 /* HuoLaLaDiZhiCell.swift */; };
E0B28DAD24D3B15E00997C69 /* HuoLaLaDiZhiCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0B28DAB24D3B15E00997C69 /* HuoLaLaDiZhiCell.xib */; };
E0B5307E247266F400FFCC15 /* DKXDAdrCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0B5307C247266F400FFCC15 /* DKXDAdrCell.swift */; };
......@@ -914,6 +916,8 @@
E0AA3A90248F626400CBFC27 /* XinCaiGouViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = XinCaiGouViewController.xib; sourceTree = "<group>"; };
E0AD92E72550E50500D82C17 /* GYS_FX_Product_VC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GYS_FX_Product_VC.swift; sourceTree = "<group>"; };
E0AD92E82550E50500D82C17 /* GYS_FX_Product_VC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GYS_FX_Product_VC.xib; sourceTree = "<group>"; };
E0AD92F72550FD1500D82C17 /* GYS_FX_SearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GYS_FX_SearchViewController.swift; sourceTree = "<group>"; };
E0AD92F82550FD1500D82C17 /* GYS_FX_SearchViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GYS_FX_SearchViewController.xib; sourceTree = "<group>"; };
E0B28DAA24D3B15E00997C69 /* HuoLaLaDiZhiCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HuoLaLaDiZhiCell.swift; sourceTree = "<group>"; };
E0B28DAB24D3B15E00997C69 /* HuoLaLaDiZhiCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HuoLaLaDiZhiCell.xib; sourceTree = "<group>"; };
E0B5307C247266F400FFCC15 /* DKXDAdrCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DKXDAdrCell.swift; sourceTree = "<group>"; };
......@@ -2246,6 +2250,8 @@
children = (
E0AD92E72550E50500D82C17 /* GYS_FX_Product_VC.swift */,
E0AD92E82550E50500D82C17 /* GYS_FX_Product_VC.xib */,
E0AD92F72550FD1500D82C17 /* GYS_FX_SearchViewController.swift */,
E0AD92F82550FD1500D82C17 /* GYS_FX_SearchViewController.xib */,
);
path = "供应商分销商品管理";
sourceTree = "<group>";
......@@ -3384,6 +3390,7 @@
F961D26F245015D6007FBE70 /* SelectContentView.xib in Resources */,
F96E9D60246657B500B5B94A /* HGImage.xcassets in Resources */,
E0206329246CD855007A40C4 /* TitleAndLblView.xib in Resources */,
E0AD92FA2550FD1500D82C17 /* GYS_FX_SearchViewController.xib in Resources */,
F961D27524503CCF007FBE70 /* OrderSelectMoreView.xib in Resources */,
E074B69D24DD305600777003 /* TitleHeaderCell.xib in Resources */,
E042F74524529B8500CDFA12 /* JiTuoWuXinXiView.xib in Resources */,
......@@ -3578,6 +3585,7 @@
E0E8ABFD246E359700E3BB54 /* GuiGeModel.swift in Sources */,
F950FDEA2451920200C40530 /* DIYCalendarCell.swift in Sources */,
F9697242248F6F7C0010D39B /* VendorListModel.swift in Sources */,
E0AD92F92550FD1500D82C17 /* GYS_FX_SearchViewController.swift in Sources */,
F950FDE224518B9500C40530 /* FSCalendarCalculator.m in Sources */,
E0D197C12448431C002B080C /* BabyToy.m in Sources */,
E0F97B0C24516B1F001BD600 /* AddImgCell.swift in Sources */,
......
......@@ -6,7 +6,6 @@
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
......@@ -47,6 +46,11 @@
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="13"/>
<state key="normal" title="取消铺货"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rhK-mv-sfb">
<rect key="frame" x="15" y="80" width="90" height="25"/>
......@@ -118,7 +122,7 @@
</constraints>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="backgroundColor" name="白色背景色"/>
<constraints>
<constraint firstItem="kGs-Qz-GbO" firstAttribute="top" secondItem="io4-Mx-VZ7" secondAttribute="bottom" constant="8" id="2bi-hC-gxR"/>
<constraint firstItem="ugc-WK-r7L" firstAttribute="top" secondItem="z5k-CZ-aID" secondAttribute="top" constant="35.5" id="4Tt-au-IaX"/>
......@@ -147,6 +151,11 @@
<constraint firstAttribute="bottom" secondItem="ugc-WK-r7L" secondAttribute="bottom" constant="35.5" id="wOK-CV-7oB"/>
<constraint firstItem="io4-Mx-VZ7" firstAttribute="top" secondItem="WYJ-BO-wv9" secondAttribute="top" id="zvR-vv-y64"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<constraints>
......@@ -192,8 +201,8 @@
<namedColor name="灰色字体颜色">
<color red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<namedColor name="白色背景色">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
......@@ -11,6 +11,7 @@ protocol SearchBarViewDelegate {
func clearSearchAction()
}
class SearchBarView: UISearchBar {
var delegateL: SearchBarViewDelegate?
override init(frame: CGRect) {
......@@ -58,7 +59,7 @@ class SearchBarView: UISearchBar {
searchField.layer.cornerRadius = cornerRadius
}
//修改占位字
func changePlstr(placeStr:String?) {
......
......@@ -68,7 +68,8 @@ class GYS_FX_Product_VC: BaseViewController,UITableViewDelegate,UITableViewDataS
var centersArr = ["1","2","3","4","5","6","7","8","9"]
func rightBtnClick() {
print("跳转搜索界面")
let vc = GYS_FX_SearchViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
override func viewDidLoad() {
super.viewDidLoad()
......
//
// GYS_FX_SearchViewController.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2020/11/3.
// Copyright © 2020 junye lu. All rights reserved.
//
import UIKit
class GYS_FX_SearchViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource, UISearchBarDelegate, SearchBarViewDelegate{
var keyword = ""
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
print("点击搜索进行--")
searchBar.resignFirstResponder()
keyword = searchBar.text!
}
//MARK:--取消搜索代理
func clearSearchAction() {
print("取消搜索代理了--")
}
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
print("编辑即将结束了--")
if searchBar.text?.count == 0 && keyword.count != 0{
keyword = searchBar.text!
}
print("key - ",searchBar.text!)
}
func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
print("调起搜索后添加个蒙版本")
return true
}
@IBAction func backAction(_ sender: UIButton) {
self.navigationController?.popViewController(animated: true)
}
@IBOutlet weak var searchView: UIView!
weak var searchV: SearchBarView? = nil
@IBOutlet weak var home_list_tbv: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = UIColor.white
let searchBr = SearchBarView.init()
searchV = searchBr
self.searchView.addSubview(searchBr)
searchV?.changecornerRadius(cornerRadius: 35*0.5)
searchBr.delegate = self
searchBr.delegateL = self
searchBr.snp.makeConstraints { (make) in
make.left.equalTo(0)
make.right.equalTo(0)
make.centerY.equalToSuperview()
make.height.equalTo(35)
}
home_list_tbv.register(UINib(nibName: "GYS_FX_ProductCellTableViewCell", bundle: nil), forCellReuseIdentifier: "GYS_FX_ProductCellTableViewCell")
home_list_tbv.delegate = self
home_list_tbv.separatorStyle = .none
home_list_tbv.dataSource = self
}
//MARK: - tableview_delegate
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "GYS_FX_ProductCellTableViewCell") as! GYS_FX_ProductCellTableViewCell
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 125
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" 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="17125"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.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="GYS_FX_SearchViewController" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="home_list_tbv" destination="XP3-hn-tEc" id="43H-Wx-Zdi"/>
<outlet property="searchView" destination="dAO-lU-fAv" id="3Ia-81-e3H"/>
<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>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3CE-yE-nGj">
<rect key="frame" x="0.0" y="44" width="414" height="49"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vnd-tm-UzP">
<rect key="frame" x="358" y="0.0" width="56" height="49"/>
<constraints>
<constraint firstAttribute="width" constant="56" id="egG-v5-Wgn"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="取消">
<color key="titleColor" name="按钮背景颜色"/>
</state>
<connections>
<action selector="backAction:" destination="-1" eventType="touchUpInside" id="ImV-X6-zX8"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dAO-lU-fAv">
<rect key="frame" x="15" y="0.0" width="343" height="49"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="vnd-tm-UzP" firstAttribute="top" secondItem="3CE-yE-nGj" secondAttribute="top" id="0EJ-qc-sHO"/>
<constraint firstAttribute="trailing" secondItem="vnd-tm-UzP" secondAttribute="trailing" id="60Y-Cu-wa9"/>
<constraint firstAttribute="bottom" secondItem="vnd-tm-UzP" secondAttribute="bottom" id="6qZ-9c-fj1"/>
<constraint firstAttribute="height" constant="49" id="EYr-Ke-hAU"/>
<constraint firstAttribute="bottom" secondItem="dAO-lU-fAv" secondAttribute="bottom" id="JEo-cw-kLX"/>
<constraint firstItem="dAO-lU-fAv" firstAttribute="top" secondItem="3CE-yE-nGj" secondAttribute="top" id="WCw-dk-nV2"/>
<constraint firstItem="vnd-tm-UzP" firstAttribute="leading" secondItem="dAO-lU-fAv" secondAttribute="trailing" id="YhK-Jd-Qvj"/>
<constraint firstItem="dAO-lU-fAv" firstAttribute="leading" secondItem="3CE-yE-nGj" secondAttribute="leading" constant="15" id="r2Z-Wx-c6W"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="XP3-hn-tEc">
<rect key="frame" x="0.0" y="93" width="414" height="769"/>
<color key="backgroundColor" name="app底色"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="dataSource" destination="-1" id="U9R-w2-Uc4"/>
<outlet property="delegate" destination="-1" id="MGI-A8-8za"/>
</connections>
</tableView>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="XP3-hn-tEc" firstAttribute="top" secondItem="3CE-yE-nGj" secondAttribute="bottom" id="55b-H1-3YK"/>
<constraint firstItem="XP3-hn-tEc" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="FA1-wY-VGk"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="XP3-hn-tEc" secondAttribute="bottom" id="JDj-hb-GKc"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="XP3-hn-tEc" secondAttribute="trailing" id="JmR-By-NM5"/>
<constraint firstItem="3CE-yE-nGj" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="b90-Ff-XRT"/>
<constraint firstItem="3CE-yE-nGj" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="uL1-jy-uTl"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="3CE-yE-nGj" secondAttribute="trailing" id="vdf-CE-0GK"/>
</constraints>
<point key="canvasLocation" x="141" y="76"/>
</view>
</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.2199999988079071" green="0.45500001311302185" blue="0.82700002193450928" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
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