Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GeliBusinessPlatform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
GeliBusinessPlatform
Commits
b8404593
Commit
b8404593
authored
May 26, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑状态下,不显示所有跟编辑相关的UI
parent
11658a08
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
47 deletions
+58
-47
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/View/Cell/AddImgCell.swift
GeliBusinessPlatform/View/Cell/AddImgCell.swift
+40
-39
GeliBusinessPlatform/View/Cell/TitleAndBtnCell.xib
GeliBusinessPlatform/View/Cell/TitleAndBtnCell.xib
+3
-2
GeliBusinessPlatform/View/Cell/TitleAndTFCell.xib
GeliBusinessPlatform/View/Cell/TitleAndTFCell.xib
+1
-1
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
...sinessPlatform/ViewController/商品详情/EPViewController.swift
+14
-5
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
b8404593
No preview for this file type
GeliBusinessPlatform/View/Cell/AddImgCell.swift
View file @
b8404593
...
...
@@ -90,8 +90,6 @@ class AddImgCell: UITableViewCell {
img
.
layer
.
masksToBounds
=
true
scrollView
!.
addSubview
(
img
)
let
imgStr
=
arr
[
i
]
print
(
SERVERCE_ImageHost
+
imgStr
)
img
.
sd_setImage
(
with
:
URL
(
string
:
SERVERCE_ImageHost
+
imgStr
))
img
.
isUserInteractionEnabled
=
true
img
.
snp
.
makeConstraints
{
(
make
)
in
...
...
@@ -99,45 +97,48 @@ class AddImgCell: UITableViewCell {
make
.
width
.
height
.
equalTo
(
90
)
make
.
left
.
equalTo
(
105*
i
)
}
let
changeBtn
=
UIButton
()
changeBtn
.
tag
=
i
changeBtn
.
backgroundColor
=
UIColor
(
named
:
"标题字颜色"
)
changeBtn
.
alpha
=
0.5
changeBtn
.
addTarget
(
self
,
action
:
#selector(
changeAction(sender:)
)
,
for
:
.
touchUpInside
)
img
.
addSubview
(
changeBtn
)
changeBtn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
bottom
.
right
.
left
.
equalTo
(
0
)
}
let
ti
=
UILabel
()
ti
.
text
=
"替 换"
ti
.
textColor
=
UIColor
.
white
ti
.
textAlignment
=
.
center
ti
.
font
=
UIFont
.
systemFont
(
ofSize
:
15
)
img
.
addSubview
(
ti
)
ti
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
bottom
.
right
.
left
.
equalTo
(
0
)
}
let
delImg
=
UIImageView
()
img
.
addSubview
(
delImg
)
delImg
.
image
=
UIImage
(
named
:
"shanchuDel"
)
delImg
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalTo
(
img
.
snp_top
)
.
offset
(
-
6
)
make
.
right
.
equalTo
(
img
.
snp_right
)
.
offset
(
6
)
make
.
width
.
height
.
equalTo
(
15
)
}
delImg
.
isHidden
=
!
isEdit
!
let
delBtn
=
UIButton
()
delBtn
.
isUserInteractionEnabled
=
isEdit
!
scrollView
!.
addSubview
(
delBtn
)
delBtn
.
tag
=
i
delBtn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
centerX
.
equalTo
(
delImg
.
snp_centerX
)
make
.
centerY
.
equalTo
(
delImg
.
snp_centerY
)
make
.
width
.
height
.
equalTo
(
25
)
if
isAllEditing
{
let
changeBtn
=
UIButton
()
changeBtn
.
tag
=
i
changeBtn
.
backgroundColor
=
UIColor
(
named
:
"标题字颜色"
)
changeBtn
.
alpha
=
0.5
changeBtn
.
addTarget
(
self
,
action
:
#selector(
changeAction(sender:)
)
,
for
:
.
touchUpInside
)
img
.
addSubview
(
changeBtn
)
changeBtn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
bottom
.
right
.
left
.
equalTo
(
0
)
}
let
ti
=
UILabel
()
ti
.
text
=
"替 换"
ti
.
textColor
=
UIColor
.
white
ti
.
textAlignment
=
.
center
ti
.
font
=
UIFont
.
systemFont
(
ofSize
:
15
)
img
.
addSubview
(
ti
)
ti
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
bottom
.
right
.
left
.
equalTo
(
0
)
}
let
delImg
=
UIImageView
()
img
.
addSubview
(
delImg
)
delImg
.
image
=
UIImage
(
named
:
"shanchuDel"
)
delImg
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalTo
(
img
.
snp_top
)
.
offset
(
-
6
)
make
.
right
.
equalTo
(
img
.
snp_right
)
.
offset
(
6
)
make
.
width
.
height
.
equalTo
(
15
)
}
delImg
.
isHidden
=
!
isEdit
!
let
delBtn
=
UIButton
()
delBtn
.
isUserInteractionEnabled
=
isEdit
!
scrollView
!.
addSubview
(
delBtn
)
delBtn
.
tag
=
i
delBtn
.
snp
.
makeConstraints
{
(
make
)
in
make
.
centerX
.
equalTo
(
delImg
.
snp_centerX
)
make
.
centerY
.
equalTo
(
delImg
.
snp_centerY
)
make
.
width
.
height
.
equalTo
(
25
)
}
delBtn
.
addTarget
(
self
,
action
:
#selector(
delAction(sender:)
)
,
for
:
.
touchUpInside
)
}
delBtn
.
addTarget
(
self
,
action
:
#selector(
delAction(sender:)
)
,
for
:
.
touchUpInside
)
}
}
@objc
func
changeAction
(
sender
:
UIButton
){
...
...
GeliBusinessPlatform/View/Cell/TitleAndBtnCell.xib
View file @
b8404593
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
6097
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
5702
"
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=
"1
6087
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
5704
"
/>
<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"
/>
...
...
@@ -25,6 +25,7 @@
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
verticalHuggingPriority=
"251"
text=
"内容"
textAlignment=
"right"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"7nL-vu-Tdl"
>
<rect
key=
"frame"
x=
"42"
y=
"0.0"
width=
"246"
height=
"44"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
name=
"灰色字体颜色"
/>
<nil
key=
"highlightedColor"
/>
...
...
GeliBusinessPlatform/View/Cell/TitleAndTFCell.xib
View file @
b8404593
...
...
@@ -10,7 +10,7 @@
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"TitleAndTFCell"
customModule=
"
GeliBusinessPlatform
"
customModuleProvider=
"target"
>
<tableViewCell
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
id=
"KGk-i7-Jjw"
customClass=
"TitleAndTFCell"
customModule=
"
TestClass
"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"50"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"KGk-i7-Jjw"
id=
"H2p-sc-9uM"
>
...
...
GeliBusinessPlatform/ViewController/商品详情/EPViewController.swift
View file @
b8404593
...
...
@@ -129,7 +129,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
HUD
.
flash
(
.
label
(
"请选择商品类型"
),
delay
:
1.2
)
return
}
print
(
"selectGoodsClassModel == "
,
selectGoodsClassModel
.
cat_id
)
if
selectGoodsClassModel
.
cat_id
==
nil
{
HUD
.
flash
(
.
label
(
"请选择商品分类"
),
delay
:
1.2
)
return
...
...
@@ -185,6 +185,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
return
}
//MARK:---新增商品接口
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
...
...
@@ -626,6 +627,11 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
cell
.
nameLbl
.
text
=
spxxArr
[
indexPath
.
row
]
cell
.
contentLbl
.
text
=
tishixxArr
[
indexPath
.
row
]
as!
String
cell
.
tag
=
indexPath
.
row
if
isAllEditing
==
false
{
cell
.
contentRight
.
constant
=
15
}
else
{
cell
.
contentRight
.
constant
=
32
}
cell
.
delegate
=
self
return
cell
case
1
:
...
...
@@ -757,7 +763,6 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
cell
.
imgBtn
.
setImage
(
UIImage
(
named
:
"tjxq"
),
for
:
.
normal
)
cell
.
btmH
.
constant
=
25
cell
.
delegate
=
self
return
cell
}
}
...
...
@@ -1401,11 +1406,15 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
}
case
4
:
return
49
default
:
if
goodsDesc
.
count
>
0
{
if
goodsDesc
.
count
>
0
{
//有内容
return
250
}
else
{
//无内容
if
isAllEditing
{
//非编辑
return
0.001
}
else
{
//编辑
return
98
}
}
return
98
}
}
func
YuShouWeiKuanFaHuoCellString
(
str
:
String
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment