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
77aacec9
Commit
77aacec9
authored
Nov 16, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工作经验
parent
2fe4741f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
253 additions
and
40 deletions
+253
-40
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+4
-0
YHWorkExperiencePositionViewViewController.swift
...(工作经验)/C/YHWorkExperiencePositionViewViewController.swift
+37
-40
YHWorkExperiencePositionReasonTableViewCell.swift
...工作经验)/V/YHWorkExperiencePositionReasonTableViewCell.swift
+212
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
77aacec9
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
040AE97A2CE73D9E00310241
/* YHWorkExperiencePositionViewViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
040AE9792CE73D9E00310241
/* YHWorkExperiencePositionViewViewController.swift */
;
};
040AE97A2CE73D9E00310241
/* YHWorkExperiencePositionViewViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
040AE9792CE73D9E00310241
/* YHWorkExperiencePositionViewViewController.swift */
;
};
040AE97C2CE7410100310241
/* YHWorkExperiencePositionViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
040AE97B2CE7410100310241
/* YHWorkExperiencePositionViewModel.swift */
;
};
040AE97C2CE7410100310241
/* YHWorkExperiencePositionViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
040AE97B2CE7410100310241
/* YHWorkExperiencePositionViewModel.swift */
;
};
040AE97E2CE7464000310241
/* YHWorkExperiencePositionListTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
040AE97D2CE7464000310241
/* YHWorkExperiencePositionListTableViewCell.swift */
;
};
040AE97E2CE7464000310241
/* YHWorkExperiencePositionListTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
040AE97D2CE7464000310241
/* YHWorkExperiencePositionListTableViewCell.swift */
;
};
040AE9802CE8340000310241
/* YHWorkExperiencePositionReasonTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
040AE97F2CE8340000310241
/* YHWorkExperiencePositionReasonTableViewCell.swift */
;
};
04129E862CD0C8490072F87B
/* YHAliYunLogManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04129E852CD0C8490072F87B
/* YHAliYunLogManager.swift */
;
};
04129E862CD0C8490072F87B
/* YHAliYunLogManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04129E852CD0C8490072F87B
/* YHAliYunLogManager.swift */
;
};
041390692C1081FA0098CB8A
/* YHFileListEmptyView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
041390682C1081FA0098CB8A
/* YHFileListEmptyView.swift */
;
};
041390692C1081FA0098CB8A
/* YHFileListEmptyView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
041390682C1081FA0098CB8A
/* YHFileListEmptyView.swift */
;
};
0414708B2C88627B00B7B688
/* YHButlerServiceManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0414708A2C88627B00B7B688
/* YHButlerServiceManager.swift */
;
};
0414708B2C88627B00B7B688
/* YHButlerServiceManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0414708A2C88627B00B7B688
/* YHButlerServiceManager.swift */
;
};
...
@@ -990,6 +991,7 @@
...
@@ -990,6 +991,7 @@
040AE9792CE73D9E00310241
/* YHWorkExperiencePositionViewViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHWorkExperiencePositionViewViewController.swift
;
sourceTree
=
"<group>"
;
};
040AE9792CE73D9E00310241
/* YHWorkExperiencePositionViewViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHWorkExperiencePositionViewViewController.swift
;
sourceTree
=
"<group>"
;
};
040AE97B2CE7410100310241
/* YHWorkExperiencePositionViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHWorkExperiencePositionViewModel.swift
;
sourceTree
=
"<group>"
;
};
040AE97B2CE7410100310241
/* YHWorkExperiencePositionViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHWorkExperiencePositionViewModel.swift
;
sourceTree
=
"<group>"
;
};
040AE97D2CE7464000310241
/* YHWorkExperiencePositionListTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHWorkExperiencePositionListTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
040AE97D2CE7464000310241
/* YHWorkExperiencePositionListTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHWorkExperiencePositionListTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
040AE97F2CE8340000310241
/* YHWorkExperiencePositionReasonTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHWorkExperiencePositionReasonTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
04129E852CD0C8490072F87B
/* YHAliYunLogManager.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAliYunLogManager.swift
;
sourceTree
=
"<group>"
;
};
04129E852CD0C8490072F87B
/* YHAliYunLogManager.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAliYunLogManager.swift
;
sourceTree
=
"<group>"
;
};
041390682C1081FA0098CB8A
/* YHFileListEmptyView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHFileListEmptyView.swift
;
sourceTree
=
"<group>"
;
};
041390682C1081FA0098CB8A
/* YHFileListEmptyView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHFileListEmptyView.swift
;
sourceTree
=
"<group>"
;
};
0414708A2C88627B00B7B688
/* YHButlerServiceManager.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHButlerServiceManager.swift
;
sourceTree
=
"<group>"
;
};
0414708A2C88627B00B7B688
/* YHButlerServiceManager.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHButlerServiceManager.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -2878,6 +2880,7 @@
...
@@ -2878,6 +2880,7 @@
040AE9752CE7195600310241
/* YHWorkExperienceListReasonTableViewCell.swift */
,
040AE9752CE7195600310241
/* YHWorkExperienceListReasonTableViewCell.swift */
,
040AE9772CE73BA600310241
/* YHWorkExperiencePositionTableViewCell.swift */
,
040AE9772CE73BA600310241
/* YHWorkExperiencePositionTableViewCell.swift */
,
040AE97D2CE7464000310241
/* YHWorkExperiencePositionListTableViewCell.swift */
,
040AE97D2CE7464000310241
/* YHWorkExperiencePositionListTableViewCell.swift */
,
040AE97F2CE8340000310241
/* YHWorkExperiencePositionReasonTableViewCell.swift */
,
);
);
path
=
V
;
path
=
V
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -5757,6 +5760,7 @@
...
@@ -5757,6 +5760,7 @@
045792192CBE08BA00EBD99B
/* YHLookResignResultViewModel.swift in Sources */
,
045792192CBE08BA00EBD99B
/* YHLookResignResultViewModel.swift in Sources */
,
A5ACE9342B4564F7002C94D2
/* YHAllApiName.swift in Sources */
,
A5ACE9342B4564F7002C94D2
/* YHAllApiName.swift in Sources */
,
04AF82D62C25542D0028CE2A
/* YHInterestTopicLayout.swift in Sources */
,
04AF82D62C25542D0028CE2A
/* YHInterestTopicLayout.swift in Sources */
,
040AE9802CE8340000310241
/* YHWorkExperiencePositionReasonTableViewCell.swift in Sources */
,
04912F6E2CB6A64700CC3105
/* YHResignAppointSubmitTipsView.swift in Sources */
,
04912F6E2CB6A64700CC3105
/* YHResignAppointSubmitTipsView.swift in Sources */
,
045EEE902B9F171A0022A143
/* YHPreviewInfoNameAndSubNameItemsView.swift in Sources */
,
045EEE902B9F171A0022A143
/* YHPreviewInfoNameAndSubNameItemsView.swift in Sources */
,
A5ACE9502B4564F7002C94D2
/* YhCacheTool.swift in Sources */
,
A5ACE9502B4564F7002C94D2
/* YhCacheTool.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/C/YHWorkExperiencePositionViewViewController.swift
View file @
77aacec9
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
//
//
import
UIKit
import
UIKit
import
AttributedString
class
YHWorkExperiencePositionViewViewController
:
YHBaseViewController
{
class
YHWorkExperiencePositionViewViewController
:
YHBaseViewController
{
var
bottomView
:
YHBottomNextView
!
var
bottomView
:
YHBottomNextView
!
...
@@ -39,6 +40,39 @@ class YHWorkExperiencePositionViewViewController: YHBaseViewController {
...
@@ -39,6 +40,39 @@ class YHWorkExperiencePositionViewViewController: YHBaseViewController {
updateDataSource
()
updateDataSource
()
}
}
func
getTextWithType
(
type
:
Int
)
->
ASAttributedString
{
if
type
==
0
{
return
.
init
(
"海外工作签证"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
))
}
if
type
==
1
{
let
a
:
ASAttributedString
=
.
init
(
"护照出入境盖章记录
\n
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
b
:
ASAttributedString
=
.
init
(
"(此类文件加分以港府审批为准)"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
(
hex
:
0x8993a2
)))
return
a
+
b
}
if
type
==
2
{
let
a
:
ASAttributedString
=
.
init
(
"出入境打印记录
\n
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
b
:
ASAttributedString
=
.
init
(
"(此类文件加分以港府审批为准)"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
(
hex
:
0x8993a2
)))
return
a
+
b
}
if
type
==
3
{
let
a
:
ASAttributedString
=
.
init
(
"以上均不能提供
\n
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
b
:
ASAttributedString
=
.
init
(
"(或将导致您的该段工作经验"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
(
hex
:
0x8993a2
)))
let
c
:
ASAttributedString
=
.
init
(
"不被认可不予加分"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
failColor
))
let
d
:
ASAttributedString
=
.
init
(
",请尽可能准备以上材料并修改此选项)"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
(
hex
:
0x8993a2
)))
return
a
+
b
+
c
+
d
}
return
.
init
(
""
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
(
alpha
:
0.5
)))
}
func
getTipsWithType
()
->
[
ASAttributedString
]
{
return
[
self
.
getTextWithType
(
type
:
0
),
self
.
getTextWithType
(
type
:
1
),
self
.
getTextWithType
(
type
:
2
),
self
.
getTextWithType
(
type
:
3
)]
}
func
updateDataSource
()
{
func
updateDataSource
()
{
bottomView
.
nextButton
.
setTitle
(
"提交"
,
for
:
.
normal
)
bottomView
.
nextButton
.
setTitle
(
"提交"
,
for
:
.
normal
)
...
@@ -56,7 +90,7 @@ class YHWorkExperiencePositionViewViewController: YHBaseViewController {
...
@@ -56,7 +90,7 @@ class YHWorkExperiencePositionViewViewController: YHBaseViewController {
tableView
.
delegate
=
self
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
dataSource
=
self
tableView
.
register
(
cellWithClass
:
YHWorkExperiencePositionListTableViewCell
.
self
)
tableView
.
register
(
cellWithClass
:
YHWorkExperiencePositionListTableViewCell
.
self
)
tableView
.
register
(
cellWithClass
:
YHWorkExperiencePositionTableViewCell
.
self
)
tableView
.
register
(
cellWithClass
:
YHWorkExperiencePosition
Reason
TableViewCell
.
self
)
return
tableView
return
tableView
}()
}()
view
.
addSubview
(
tableView
)
view
.
addSubview
(
tableView
)
...
@@ -173,45 +207,8 @@ extension YHWorkExperiencePositionViewViewController: UITableViewDelegate, UITab
...
@@ -173,45 +207,8 @@ extension YHWorkExperiencePositionViewViewController: UITableViewDelegate, UITab
}
}
return
cell
return
cell
}
else
{
}
else
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHWorkExperiencePositionTableViewCell
.
self
)
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHWorkExperiencePositionReasonTableViewCell
.
self
)
cell
.
showPrompt
=
isShowPrompt
cell
.
dataSource
=
getTipsWithType
()
// cell.dataSource = dataSource
if
isMore
{
cell
.
more
()
}
else
{
cell
.
cannal
()
}
cell
.
clickBlock
=
{[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
// let firstModel = self.dataSource?.first
// let vc = YHWorkExperienceViewController()
// vc.workExperienceID = "\(model.id ?? 0)"
// vc.orderID = self.orderId
// vc.isShowMessageSelect = true
// if firstModel?.id == model.id {
// vc.isShowMessageSelect = false
// }
// self.navigationController?.pushViewController(vc, animated: true)
}
cell
.
deleteBlock
=
{[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
// self.showDeleteAlert(model)
}
cell
.
isMoreBlock
=
{[
weak
self
]
isMore
in
guard
let
self
=
self
else
{
return
}
self
.
isMore
=
isMore
}
cell
.
newWorkBlock
=
{[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
// if self.dataSource?.count == 10 {
// YHHUD.flash(message: "新增工作经历不能超过10条")
// } else {
// let vc = YHWorkExperienceViewController()
// vc.isShowMessageSelect = true
// vc.orderID = self.orderId
// self.navigationController?.pushViewController(vc, animated: true)
// }
}
cell
.
backgroundColor
=
.
clear
cell
.
backgroundColor
=
.
clear
cell
.
contentView
.
backgroundColor
=
.
clear
cell
.
contentView
.
backgroundColor
=
.
clear
return
cell
return
cell
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/V/YHWorkExperiencePositionReasonTableViewCell.swift
0 → 100644
View file @
77aacec9
//
// YHWorkExperiencePositionReasonTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
AttributedString
class
YHWorkExperiencePositionReasonTableViewCell
:
UITableViewCell
{
typealias
SelectBlock
=
(
_
selectIndex
:
[
Int
])
->
()
var
selectBlock
:
SelectBlock
?
var
selectItem
:
[
Int
]
=
[]
var
centerView
:
UIView
!
var
titleLabel
:
UILabel
!
var
subTitleLabel
:
UILabel
!
var
lineView
:
UIView
!
var
mainItemView
:
UIView
!
var
dataSource
:
[
ASAttributedString
]?
{
didSet
{
updateAllViews
()
}
}
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
// Initialization code
}
override
func
setSelected
(
_
selected
:
Bool
,
animated
:
Bool
)
{
super
.
setSelected
(
selected
,
animated
:
animated
)
// Configure the view for the selected state
}
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
}
override
init
(
style
:
UITableViewCell
.
CellStyle
,
reuseIdentifier
:
String
?)
{
super
.
init
(
style
:
style
,
reuseIdentifier
:
reuseIdentifier
)
selectionStyle
=
.
none
setupUI
()
}
func
setupUI
()
{
backgroundColor
=
.
clear
centerView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
kCornerRadius6
return
view
}()
contentView
.
addSubview
(
centerView
)
centerView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
top
.
bottom
.
equalToSuperview
()
}
titleLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
17
)
label
.
textColor
=
UIColor
.
mainTextColor
label
.
text
=
"证件提供确认"
return
label
}()
centerView
.
addSubview
(
titleLabel
)
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
16
)
make
.
height
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
18
)
}
subTitleLabel
=
{
let
label
=
UILabel
()
label
.
numberOfLines
=
0
let
str
=
"*"
+
"您可以提供以下哪种工作证明文件:"
let
attributes
:
[
NSAttributedString
.
Key
:
Any
]
=
[
.
font
:
UIFont
.
PFSC_R
(
ofSize
:
14
),
.
foregroundColor
:
UIColor
.
mainTextColor
]
let
questionAttrStr
=
NSMutableAttributedString
(
string
:
str
,
attributes
:
attributes
)
let
starRange
=
NSRange
(
location
:
0
,
length
:
1
)
questionAttrStr
.
addAttribute
(
NSAttributedString
.
Key
.
foregroundColor
,
value
:
UIColor
.
failColor
,
range
:
starRange
)
label
.
attributedText
=
questionAttrStr
return
label
}()
centerView
.
addSubview
(
subTitleLabel
)
subTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
52
)
make
.
height
.
equalTo
(
52
)
make
.
right
.
equalTo
(
-
18
)
}
lineView
=
{
let
label
=
UIView
()
label
.
backgroundColor
=
UIColor
.
separatorColor
return
label
}()
centerView
.
addSubview
(
lineView
)
lineView
.
snp
.
makeConstraints
{
make
in
make
.
height
.
equalTo
(
1
)
make
.
top
.
equalTo
(
52
)
make
.
left
.
right
.
equalToSuperview
()
}
mainItemView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
return
view
}()
centerView
.
addSubview
(
mainItemView
)
mainItemView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
-
16
)
make
.
top
.
equalTo
(
104
)
}
}
func
updateAllViews
()
{
mainItemView
.
removeSubviews
()
for
i
in
0
..<
(
dataSource
?
.
count
??
0
)
{
let
bgviewButton
=
{
let
view
=
UIButton
()
view
.
backgroundColor
=
UIColor
.
contentBkgColor
view
.
layer
.
cornerRadius
=
3
view
.
layer
.
borderColor
=
UIColor
.
brandMainColor
.
cgColor
view
.
addTarget
(
self
,
action
:
#selector(
agreeClick(sender:)
)
,
for
:
.
touchUpInside
)
view
.
tag
=
20000
+
i
return
view
}()
mainItemView
.
addSubview
(
bgviewButton
)
let
agreeButton
=
{
let
button
=
UIImageView
()
button
.
image
=
UIImage
(
named
:
"login_privacy_disagree_glay"
)
button
.
tag
=
10000
+
i
if
selectItem
.
contains
(
i
)
{
button
.
image
=
UIImage
(
named
:
"login_privacy_agree"
)
}
else
{
button
.
image
=
UIImage
(
named
:
"login_privacy_disagree_glay"
)
}
return
button
}()
mainItemView
.
addSubview
(
agreeButton
)
agreeButton
.
snp
.
makeConstraints
{
make
in
if
i
==
0
{
make
.
top
.
equalToSuperview
()
.
offset
(
16
)
}
else
{
let
view
=
mainItemView
.
viewWithTag
(
1000
+
i
-
1
)
make
.
top
.
equalTo
(
view
?
.
snp
.
bottom
??
mainItemView
.
snp
.
bottom
)
.
offset
(
48
)
}
make
.
left
.
equalTo
(
34
)
make
.
height
.
equalTo
(
13
)
make
.
width
.
equalTo
(
13
)
}
let
subTitleLabel
=
{
let
label
=
UILabel
()
label
.
attributed
.
text
=
dataSource
?[
i
]
label
.
numberOfLines
=
0
label
.
tag
=
1000
+
i
return
label
}()
mainItemView
.
addSubview
(
subTitleLabel
)
subTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
agreeButton
.
snp
.
top
)
.
offset
(
-
3
)
make
.
left
.
equalTo
(
56
)
make
.
right
.
equalTo
(
-
35
)
if
i
==
(
dataSource
?
.
count
??
0
)
-
1
&&
!
selectItem
.
contains
(
6
)
{
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
16
)
}
}
bgviewButton
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
subTitleLabel
.
snp
.
top
)
.
offset
(
-
16
)
make
.
bottom
.
equalTo
(
subTitleLabel
.
snp
.
bottom
)
.
offset
(
16
)
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
}
}
}
@objc
func
agreeClick
(
sender
:
UIButton
)
{
sender
.
isSelected
=
!
sender
.
isSelected
if
sender
.
isSelected
{
sender
.
layer
.
borderWidth
=
1
sender
.
backgroundColor
=
UIColor
(
hex
:
0xebf0f9
)
selectItem
.
append
(
sender
.
tag
-
20000
)
let
view
=
mainItemView
.
viewWithTag
(
sender
.
tag
-
20000
+
10000
)
as!
UIImageView
view
.
image
=
UIImage
(
named
:
"login_privacy_agree"
)
}
else
{
sender
.
layer
.
borderWidth
=
0
sender
.
backgroundColor
=
UIColor
.
contentBkgColor
selectItem
.
removeAll
(
where
:
{
$0
==
sender
.
tag
-
20000
})
let
view
=
mainItemView
.
viewWithTag
(
sender
.
tag
-
20000
+
10000
)
as!
UIImageView
view
.
image
=
UIImage
(
named
:
"login_privacy_disagree_glay"
)
}
if
let
block
=
selectBlock
{
block
(
selectItem
)
}
}
}
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