Commit 6ae22f2a authored by lujunye's avatar lujunye

商品详情增加取消编辑按钮

parent cc426de1
...@@ -122,7 +122,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo ...@@ -122,7 +122,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
return return
} }
if sender.tag == 1001 { if sender.tag == 1001 {
navbar.rightTitle = "取消编辑"
GeneralInfo(["user_token":UserToken as Any], success: { (data) in GeneralInfo(["user_token":UserToken as Any], success: { (data) in
HUD.hide(animated: true) HUD.hide(animated: true)
self.generalInfoModel = (data as! GeneralInfoModel) self.generalInfoModel = (data as! GeneralInfoModel)
...@@ -303,7 +303,12 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo ...@@ -303,7 +303,12 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
} }
} }
} }
func rightBtnClick() {
navbar.rightTitle = ""
self.isAllEditing = false
self.btmColor.backgroundColor = UIColor.white
loadData()
}
var editBtn:UIButton? var editBtn:UIButton?
@objc func btmBtnClick(sender:UIButton){ @objc func btmBtnClick(sender:UIButton){
switch sender.titleLabel!.text { switch sender.titleLabel!.text {
...@@ -316,7 +321,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo ...@@ -316,7 +321,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确认"), for: .normal) alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确认"), for: .normal)
alertView.rightBtn.tag = 1001 alertView.rightBtn.tag = 1001
self.view.window?.addSubview(alertView) self.view.window?.addSubview(alertView)
break break
case "保存": case "保存":
print("保存按钮submitAction") print("保存按钮submitAction")
...@@ -695,6 +700,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo ...@@ -695,6 +700,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
isYuShouShangPin = false isYuShouShangPin = false
navbar.title = "商品详情" navbar.title = "商品详情"
self.view.addSubview(navbar) self.view.addSubview(navbar)
SetTopFrameView(view: listTbv, btmView: btmBtnBGView) SetTopFrameView(view: listTbv, btmView: btmBtnBGView)
listTbv.isHidden = true listTbv.isHidden = true
......
<?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="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <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"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<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="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
...@@ -25,7 +26,7 @@ ...@@ -25,7 +26,7 @@
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8BW-ln-Nxl"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8BW-ln-Nxl">
<rect key="frame" x="0.0" y="813" width="414" height="83"/> <rect key="frame" x="0.0" y="813" width="414" height="83"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view> </view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="H2x-8q-Enj"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="H2x-8q-Enj">
<rect key="frame" x="0.0" y="813" width="414" height="49"/> <rect key="frame" x="0.0" y="813" width="414" height="49"/>
...@@ -58,13 +59,14 @@ ...@@ -58,13 +59,14 @@
</view> </view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="pjO-Zv-8Xp"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="pjO-Zv-8Xp">
<rect key="frame" x="0.0" y="44" width="414" height="769"/> <rect key="frame" x="0.0" y="44" width="414" height="769"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<connections> <connections>
<outlet property="dataSource" destination="-1" id="Qxe-3c-Jdc"/> <outlet property="dataSource" destination="-1" id="Qxe-3c-Jdc"/>
<outlet property="delegate" destination="-1" id="h9F-Bd-Mqm"/> <outlet property="delegate" destination="-1" id="h9F-Bd-Mqm"/>
</connections> </connections>
</tableView> </tableView>
</subviews> </subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="bottom" secondItem="8BW-ln-Nxl" secondAttribute="bottom" id="4Gl-Yg-o45"/> <constraint firstAttribute="bottom" secondItem="8BW-ln-Nxl" secondAttribute="bottom" id="4Gl-Yg-o45"/>
...@@ -79,7 +81,6 @@ ...@@ -79,7 +81,6 @@
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="pjO-Zv-8Xp" secondAttribute="trailing" id="q2T-Md-gwK"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="pjO-Zv-8Xp" secondAttribute="trailing" id="q2T-Md-gwK"/>
<constraint firstItem="8BW-ln-Nxl" firstAttribute="top" secondItem="H2x-8q-Enj" secondAttribute="top" id="qVu-HU-nQk"/> <constraint firstItem="8BW-ln-Nxl" firstAttribute="top" secondItem="H2x-8q-Enj" secondAttribute="top" id="qVu-HU-nQk"/>
</constraints> </constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="131.8840579710145" y="101.78571428571428"/> <point key="canvasLocation" x="131.8840579710145" y="101.78571428571428"/>
</view> </view>
</objects> </objects>
...@@ -87,5 +88,8 @@ ...@@ -87,5 +88,8 @@
<namedColor name="灰色分界线"> <namedColor name="灰色分界线">
<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>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources> </resources>
</document> </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