Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
4fcd7286
Commit
4fcd7286
authored
Mar 06, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
至今按钮添加
parent
4cd869ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
22 deletions
+96
-22
YHWorkExperienceViewController.swift
...rkExperience(工作经验)/C/YHWorkExperienceViewController.swift
+26
-22
YHWorkExperienceItemView.swift
...流程)/WorkExperience(工作经验)/V/YHWorkExperienceItemView.swift
+70
-0
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/WorkExperience(工作经验)/C/YHWorkExperienceViewController.swift
View file @
4fcd7286
...
...
@@ -155,32 +155,36 @@ class YHWorkExperienceViewController: YHBaseViewController {
}
@objc
func
keyboardWillShow
(
_
notification
:
Notification
)
{
// 当键盘将要显示时调用此函数
stepView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
left
.
right
.
equalTo
(
view
)
make
.
height
.
equalTo
(
0
)
}
stepView
.
isHidden
=
true
tableView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
64
)
make
.
left
.
right
.
bottom
.
equalTo
(
view
)
if
stepView
.
currentIndex
!=
0
{
// 当键盘将要显示时调用此函数
stepView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
left
.
right
.
equalTo
(
view
)
make
.
height
.
equalTo
(
0
)
}
stepView
.
isHidden
=
true
tableView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
64
)
make
.
left
.
right
.
bottom
.
equalTo
(
view
)
}
}
}
@objc
func
keyboardWillHide
(
_
notification
:
Notification
)
{
// 当键盘将要隐藏时调用此函数
stepView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
left
.
right
.
equalTo
(
view
)
make
.
height
.
equalTo
(
104
)
}
stepView
.
isHidden
=
false
tableView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
+
YHStepView
.
height
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
64
)
make
.
left
.
right
.
bottom
.
equalTo
(
view
)
if
stepView
.
currentIndex
!=
0
{
// 当键盘将要隐藏时调用此函数
stepView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
left
.
right
.
equalTo
(
view
)
make
.
height
.
equalTo
(
104
)
}
stepView
.
isHidden
=
false
tableView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
+
YHStepView
.
height
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
64
)
make
.
left
.
right
.
bottom
.
equalTo
(
view
)
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/WorkExperience(工作经验)/V/YHWorkExperienceItemView.swift
View file @
4fcd7286
...
...
@@ -18,6 +18,7 @@ class YHWorkExperienceItemView: UIView {
var
leftButton
:
UIButton
!
var
rightButton
:
UIButton
!
var
showPromptLabel
:
UILabel
!
var
longTimeButton
:
UIButton
!
var
dataSource
:
YHWorkExperienceModel
?
{
didSet
{
...
...
@@ -133,10 +134,51 @@ class YHWorkExperienceItemView: UIView {
make
.
height
.
equalTo
(
32
)
make
.
width
.
equalTo
(
74
)
}
longTimeButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setImage
(
UIImage
(
named
:
"main_time_normal"
),
for
:
.
normal
)
button
.
setImage
(
UIImage
(
named
:
"main_time_select"
),
for
:
.
selected
)
button
.
setTitleColor
(
UIColor
.
mainTextColor
,
for
:
.
normal
)
button
.
setTitle
(
"至今"
,
for
:
.
normal
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
button
.
contentHorizontalAlignment
=
.
right
button
.
addTarget
(
self
,
action
:
#selector(
longTimeButtonClick
)
,
for
:
.
touchUpInside
)
button
.
imageEdgeInsets
=
UIEdgeInsets
(
top
:
10
,
left
:
0
,
bottom
:
10
,
right
:
30
)
button
.
isSelected
=
false
return
button
}()
addSubview
(
longTimeButton
)
longTimeButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalToSuperview
()
make
.
centerY
.
equalToSuperview
()
make
.
height
.
equalTo
(
32
)
make
.
width
.
equalTo
(
43
)
}
}
@objc
func
longTimeButtonClick
()
{
longTimeButton
.
isSelected
=
!
longTimeButton
.
isSelected
if
longTimeButton
.
isSelected
{
self
.
dataSource
?
.
message
=
"至今"
self
.
updateAllViews
()
if
let
block
=
self
.
block
{
block
(
self
.
dataSource
??
YHWorkExperienceModel
())
}
}
else
{
self
.
dataSource
?
.
message
=
""
self
.
updateAllViews
()
if
let
block
=
self
.
block
{
block
(
self
.
dataSource
??
YHWorkExperienceModel
())
}
}
}
func
updateAllViews
()
{
guard
let
dataSource
=
dataSource
else
{
return
}
if
dataSource
.
id
==
.
id14
||
dataSource
.
id
==
.
id16
||
dataSource
.
id
==
.
id17
{
messageTextField
.
keyboardType
=
.
numberPad
}
if
dataSource
.
isNeed
??
false
{
let
str
=
"*"
+
(
dataSource
.
title
??
""
)
let
attributes
:
[
NSAttributedString
.
Key
:
Any
]
=
[
...
...
@@ -236,6 +278,34 @@ class YHWorkExperienceItemView: UIView {
}
else
{
showPromptLabel
.
isHidden
=
true
}
if
dataSource
.
id
==
.
id10
{
longTimeButton
.
isHidden
=
false
nextStepImageView
.
isHidden
=
true
if
dataSource
.
message
==
"至今"
{
longTimeButton
.
isSelected
=
true
longTimeButton
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
messageTextField
.
snp
.
left
)
make
.
centerY
.
equalToSuperview
()
make
.
height
.
equalTo
(
32
)
make
.
width
.
equalTo
(
43
)
}
centerButton
.
isHidden
=
true
messageTextField
.
isHidden
=
true
}
else
{
longTimeButton
.
isSelected
=
false
longTimeButton
.
snp
.
remakeConstraints
{
make
in
make
.
right
.
equalToSuperview
()
make
.
centerY
.
equalToSuperview
()
make
.
height
.
equalTo
(
32
)
make
.
width
.
equalTo
(
43
)
}
centerButton
.
isHidden
=
false
messageTextField
.
isHidden
=
false
}
}
else
{
longTimeButton
.
isHidden
=
true
}
}
func
buttonState
(
isLeft
:
Bool
)
{
...
...
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