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
5ec6348c
Commit
5ec6348c
authored
Jun 20, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 卡片
parent
cb60d525
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
276 additions
and
51 deletions
+276
-51
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+4
-0
YHMatchPeopleViewController.swift
...Modules/Community(社区)/C/YHMatchPeopleViewController.swift
+37
-16
YHFriendRequestView.swift
...Classes/Modules/Community(社区)/V/YHFriendRequestView.swift
+82
-11
YHNameCardInfoView.swift
.../Classes/Modules/Community(社区)/V/YHNameCardInfoView.swift
+27
-24
YHPeopleMatchNoDataView.swift
...ses/Modules/Community(社区)/V/YHPeopleMatchNoDataView.swift
+99
-0
UIColor+Extension.swift
...xy/galaxy/Classes/Tools/Extention/UIColor+Extension.swift
+5
-0
Contents.json
...ets/People/people_match_no_data_bg.imageset/Contents.json
+22
-0
Group 2033195118@2x.png
.../people_match_no_data_bg.imageset/Group 2033195118@2x.png
+0
-0
Group 2033195118@3x.png
.../people_match_no_data_bg.imageset/Group 2033195118@3x.png
+0
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
5ec6348c
...
@@ -337,6 +337,7 @@
...
@@ -337,6 +337,7 @@
04FA8B2E2C084C7E00ABE43F
/* ATAuthSDK.bundle in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FA8B2D2C084C7E00ABE43F
/* ATAuthSDK.bundle */
;
};
04FA8B2E2C084C7E00ABE43F
/* ATAuthSDK.bundle in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FA8B2D2C084C7E00ABE43F
/* ATAuthSDK.bundle */
;
};
04FA8B302C0874CA00ABE43F
/* YHOneKeyLoginViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FA8B2F2C0874CA00ABE43F
/* YHOneKeyLoginViewModel.swift */
;
};
04FA8B302C0874CA00ABE43F
/* YHOneKeyLoginViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FA8B2F2C0874CA00ABE43F
/* YHOneKeyLoginViewModel.swift */
;
};
04FA8B332C0880A100ABE43F
/* YHAppleLoginViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FA8B322C0880A100ABE43F
/* YHAppleLoginViewModel.swift */
;
};
04FA8B332C0880A100ABE43F
/* YHAppleLoginViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FA8B322C0880A100ABE43F
/* YHAppleLoginViewModel.swift */
;
};
04FB01CE2C23DDBD0040115D
/* YHPeopleMatchNoDataView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FB01CD2C23DDBD0040115D
/* YHPeopleMatchNoDataView.swift */
;
};
04FD85662C2124AF00BEF9C5
/* YHMyNameCardViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FD85652C2124AF00BEF9C5
/* YHMyNameCardViewController.swift */
;
};
04FD85662C2124AF00BEF9C5
/* YHMyNameCardViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FD85652C2124AF00BEF9C5
/* YHMyNameCardViewController.swift */
;
};
04FD85682C21277800BEF9C5
/* YHMyNameCardAvatarInfoCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FD85672C21277800BEF9C5
/* YHMyNameCardAvatarInfoCell.swift */
;
};
04FD85682C21277800BEF9C5
/* YHMyNameCardAvatarInfoCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FD85672C21277800BEF9C5
/* YHMyNameCardAvatarInfoCell.swift */
;
};
04FD856A2C21362300BEF9C5
/* YHMyIntroductionCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FD85692C21362300BEF9C5
/* YHMyIntroductionCell.swift */
;
};
04FD856A2C21362300BEF9C5
/* YHMyIntroductionCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04FD85692C21362300BEF9C5
/* YHMyIntroductionCell.swift */
;
};
...
@@ -868,6 +869,7 @@
...
@@ -868,6 +869,7 @@
04FA8B2D2C084C7E00ABE43F
/* ATAuthSDK.bundle */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.plug-in"
;
name
=
ATAuthSDK.bundle
;
path
=
"galaxy/Classes/Modules/AutoLogin(一键登录)/framework/ATAuthSDK_D.framework/ATAuthSDK.bundle"
;
sourceTree
=
"<group>"
;
};
04FA8B2D2C084C7E00ABE43F
/* ATAuthSDK.bundle */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.plug-in"
;
name
=
ATAuthSDK.bundle
;
path
=
"galaxy/Classes/Modules/AutoLogin(一键登录)/framework/ATAuthSDK_D.framework/ATAuthSDK.bundle"
;
sourceTree
=
"<group>"
;
};
04FA8B2F2C0874CA00ABE43F
/* YHOneKeyLoginViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHOneKeyLoginViewModel.swift
;
sourceTree
=
"<group>"
;
};
04FA8B2F2C0874CA00ABE43F
/* YHOneKeyLoginViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHOneKeyLoginViewModel.swift
;
sourceTree
=
"<group>"
;
};
04FA8B322C0880A100ABE43F
/* YHAppleLoginViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAppleLoginViewModel.swift
;
sourceTree
=
"<group>"
;
};
04FA8B322C0880A100ABE43F
/* YHAppleLoginViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAppleLoginViewModel.swift
;
sourceTree
=
"<group>"
;
};
04FB01CD2C23DDBD0040115D
/* YHPeopleMatchNoDataView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPeopleMatchNoDataView.swift
;
sourceTree
=
"<group>"
;
};
04FD85652C2124AF00BEF9C5
/* YHMyNameCardViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMyNameCardViewController.swift
;
sourceTree
=
"<group>"
;
};
04FD85652C2124AF00BEF9C5
/* YHMyNameCardViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMyNameCardViewController.swift
;
sourceTree
=
"<group>"
;
};
04FD85672C21277800BEF9C5
/* YHMyNameCardAvatarInfoCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMyNameCardAvatarInfoCell.swift
;
sourceTree
=
"<group>"
;
};
04FD85672C21277800BEF9C5
/* YHMyNameCardAvatarInfoCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMyNameCardAvatarInfoCell.swift
;
sourceTree
=
"<group>"
;
};
04FD85692C21362300BEF9C5
/* YHMyIntroductionCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMyIntroductionCell.swift
;
sourceTree
=
"<group>"
;
};
04FD85692C21362300BEF9C5
/* YHMyIntroductionCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMyIntroductionCell.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -2113,6 +2115,7 @@
...
@@ -2113,6 +2115,7 @@
04FD85712C21786900BEF9C5
/* YHNameCardInfoView.swift */
,
04FD85712C21786900BEF9C5
/* YHNameCardInfoView.swift */
,
044D0BFF2C21663300C5CF5E
/* YHMyInformationItemCell.swift */
,
044D0BFF2C21663300C5CF5E
/* YHMyInformationItemCell.swift */
,
044D0C052C22736F00C5CF5E
/* YHSetExplainView.swift */
,
044D0C052C22736F00C5CF5E
/* YHSetExplainView.swift */
,
04FB01CD2C23DDBD0040115D
/* YHPeopleMatchNoDataView.swift */
,
);
);
path
=
V
;
path
=
V
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -3003,6 +3006,7 @@
...
@@ -3003,6 +3006,7 @@
044867B82BA1C75700DFAD4A
/* YHCertificateUploadFailTipsView.swift in Sources */
,
044867B82BA1C75700DFAD4A
/* YHCertificateUploadFailTipsView.swift in Sources */
,
044D0C062C22736F00C5CF5E
/* YHSetExplainView.swift in Sources */
,
044D0C062C22736F00C5CF5E
/* YHSetExplainView.swift in Sources */
,
045EEF002B9F171A0022A143
/* YHFormItemEnterDetailCell.swift in Sources */
,
045EEF002B9F171A0022A143
/* YHFormItemEnterDetailCell.swift in Sources */
,
04FB01CE2C23DDBD0040115D
/* YHPeopleMatchNoDataView.swift in Sources */
,
A5ACE9362B4564F7002C94D2
/* YHNetworkStatusManager.swift in Sources */
,
A5ACE9362B4564F7002C94D2
/* YHNetworkStatusManager.swift in Sources */
,
048787D52BCE880B0036E221
/* YHServiceOrderListViewController.swift in Sources */
,
048787D52BCE880B0036E221
/* YHServiceOrderListViewController.swift in Sources */
,
A5D0012A2BABC84A001F003C
/* YHFileListHeaerView.swift in Sources */
,
A5D0012A2BABC84A001F003C
/* YHFileListHeaerView.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/C/YHMatchPeopleViewController.swift
View file @
5ec6348c
...
@@ -66,7 +66,14 @@ class YHMatchPeopleViewController: YHBaseViewController {
...
@@ -66,7 +66,14 @@ class YHMatchPeopleViewController: YHBaseViewController {
return
btn
return
btn
}()
}()
private
let
allowedDirection
:
[
Direction
]
=
[
.
left
,
.
up
,
.
right
]
lazy
var
noDataView
:
YHPeopleMatchNoDataView
=
{
let
view
=
YHPeopleMatchNoDataView
.
createView
()
view
.
isHidden
=
true
return
view
}()
// 卡片允许使用的手势方向
private
let
allowedDirection
:
[
Direction
]
=
[
.
left
,
.
right
]
lazy
var
cardContainer
:
DragCardContainer
=
{
lazy
var
cardContainer
:
DragCardContainer
=
{
let
cardContainer
=
DragCardContainer
()
let
cardContainer
=
DragCardContainer
()
// 是否可以无限滑动
// 是否可以无限滑动
...
@@ -120,11 +127,13 @@ class YHMatchPeopleViewController: YHBaseViewController {
...
@@ -120,11 +127,13 @@ class YHMatchPeopleViewController: YHBaseViewController {
func
createUI
()
{
func
createUI
()
{
gk_navigationBar
.
isHidden
=
true
gk_navigationBar
.
isHidden
=
true
self
.
view
.
addSubview
(
bgImgV
)
self
.
view
.
addSubview
(
bgImgV
)
self
.
view
.
addSubview
(
self
.
cardActionView
)
self
.
view
.
addSubview
(
navBar
)
self
.
view
.
addSubview
(
topLabel
)
self
.
view
.
addSubview
(
topLabel
)
self
.
view
.
addSubview
(
changeBtn
)
self
.
view
.
addSubview
(
changeBtn
)
self
.
view
.
addSubview
(
myCardBtn
)
self
.
view
.
addSubview
(
myCardBtn
)
let
lineView
=
UIView
()
let
lineView
=
UIView
()
lineView
.
backgroundColor
=
UIColor
(
hex
:
0xFFFFFF
,
alpha
:
0.3
)
lineView
.
backgroundColor
=
UIColor
(
hex
:
0xFFFFFF
,
alpha
:
0.3
)
self
.
view
.
addSubview
(
lineView
)
self
.
view
.
addSubview
(
lineView
)
...
@@ -135,8 +144,9 @@ class YHMatchPeopleViewController: YHBaseViewController {
...
@@ -135,8 +144,9 @@ class YHMatchPeopleViewController: YHBaseViewController {
let
wingRightImgV
=
UIImageView
(
image
:
UIImage
(
named
:
"people_match_wing_right"
))
let
wingRightImgV
=
UIImageView
(
image
:
UIImage
(
named
:
"people_match_wing_right"
))
self
.
view
.
addSubview
(
wingRightImgV
)
self
.
view
.
addSubview
(
wingRightImgV
)
self
.
view
.
addSubview
(
self
.
cardActionView
)
self
.
cardActionView
.
addSubview
(
cardContainer
)
self
.
cardActionView
.
addSubview
(
cardContainer
)
self
.
view
.
addSubview
(
navBar
)
self
.
view
.
addSubview
(
self
.
noDataView
)
self
.
bgImgV
.
snp
.
makeConstraints
{
make
in
self
.
bgImgV
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
make
.
edges
.
equalToSuperview
()
...
@@ -183,16 +193,24 @@ class YHMatchPeopleViewController: YHBaseViewController {
...
@@ -183,16 +193,24 @@ class YHMatchPeopleViewController: YHBaseViewController {
}
}
self
.
cardActionView
.
snp
.
makeConstraints
{
make
in
self
.
cardActionView
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalToSuperview
()
.
offset
(
102
+
k_Height_NavigationtBarAndStatuBar
)
make
.
height
.
equalTo
(
466.0
)
}
}
self
.
cardContainer
.
snp
.
makeConstraints
{
make
in
self
.
cardContainer
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
equalToSuperview
()
make
.
centerX
.
equalToSuperview
()
make
.
left
.
equalTo
(
36
)
make
.
left
.
equalTo
(
36
)
make
.
right
.
equalTo
(
-
36
)
make
.
right
.
equalTo
(
-
36
)
make
.
top
.
equalToSuperview
()
.
offset
(
102
+
k_Height_NavigationtBarAndStatuBar
)
make
.
top
.
equalToSuperview
()
make
.
height
.
equalTo
(
466.0
)
make
.
height
.
equalTo
(
466.0
)
}
}
self
.
noDataView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
self
.
topLabel
.
snp
.
bottom
)
.
offset
(
120
)
make
.
height
.
equalTo
(
YHPeopleMatchNoDataView
.
height
)
}
animaiton
()
animaiton
()
}
}
...
@@ -202,12 +220,12 @@ class YHMatchPeopleViewController: YHBaseViewController {
...
@@ -202,12 +220,12 @@ class YHMatchPeopleViewController: YHBaseViewController {
view1
.
y
=
-
YHNameCardInfoView
.
height
view1
.
y
=
-
YHNameCardInfoView
.
height
view1
.
x
=
36
view1
.
x
=
36
let
view2
=
YHNameCardInfoView
.
createCardView
()
let
view2
=
YHNameCardInfoView
.
createCardView
()
view2
.
cardView
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xE7EBF3
)
view2
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xE7EBF3
)
view2
.
y
=
-
YHNameCardInfoView
.
height
view2
.
y
=
-
YHNameCardInfoView
.
height
view2
.
x
=
36
+
5
view2
.
x
=
36
+
5
view2
.
width
=
YHNameCardInfoView
.
width
-
5*
2
view2
.
width
=
YHNameCardInfoView
.
width
-
5*
2
let
view3
=
YHNameCardInfoView
.
createCardView
()
let
view3
=
YHNameCardInfoView
.
createCardView
()
view3
.
cardView
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xC4CEE3
)
view3
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xC4CEE3
)
view3
.
y
=
-
YHNameCardInfoView
.
height
view3
.
y
=
-
YHNameCardInfoView
.
height
view3
.
x
=
36
+
10
view3
.
x
=
36
+
10
view3
.
width
=
YHNameCardInfoView
.
width
-
5*
4
view3
.
width
=
YHNameCardInfoView
.
width
-
5*
4
...
@@ -247,24 +265,26 @@ extension YHMatchPeopleViewController: DragCardDataSource {
...
@@ -247,24 +265,26 @@ extension YHMatchPeopleViewController: DragCardDataSource {
let
cardView
:
YHNameCardInfoView
=
YHNameCardInfoView
.
createCardView
()
let
cardView
:
YHNameCardInfoView
=
YHNameCardInfoView
.
createCardView
()
cardView
.
allowedDirection
=
self
.
allowedDirection
cardView
.
allowedDirection
=
self
.
allowedDirection
cardView
.
tag
=
1000
+
index
if
index
%
3
==
0
{
cardView
.
cardView
.
backgroundColor
=
.
white
}
else
if
index
%
3
==
1
{
cardView
.
cardView
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xE7EBF3
)
}
else
if
index
%
3
==
2
{
cardView
.
cardView
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xC4CEE3
)
}
return
cardView
return
cardView
}
}
}
}
extension
YHMatchPeopleViewController
:
DragCardDelegate
{
extension
YHMatchPeopleViewController
:
DragCardDelegate
{
public
func
dragCard
(
_
dragCard
:
DragCardContainer
,
displayTopCardAt
index
:
Int
,
with
cardView
:
DragCardView
)
{
public
func
dragCard
(
_
dragCard
:
DragCardContainer
,
displayTopCardAt
index
:
Int
,
with
cardView
:
DragCardView
)
{
print
(
"displayTopCardAt:
\(
index
)
"
)
print
(
"displayTopCardAt:
\(
index
)
"
)
if
cardView
is
YHNameCardInfoView
{
if
cardView
is
YHNameCardInfoView
{
let
cardInfoView
=
cardView
as!
YHNameCardInfoView
let
cardInfoView
=
cardView
as!
YHNameCardInfoView
cardInfoView
.
cardView
.
backgroundColor
=
.
white
cardInfoView
.
backgroundColor
=
.
white
if
let
secondCardView
=
dragCard
.
viewWithTag
(
1000
+
index
+
1
)
as?
YHNameCardInfoView
{
secondCardView
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xE7EBF3
)
}
if
let
thirdCardView
=
dragCard
.
viewWithTag
(
1000
+
index
+
2
)
as?
YHNameCardInfoView
{
thirdCardView
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xC4CEE3
)
}
}
}
}
}
...
@@ -274,6 +294,7 @@ extension YHMatchPeopleViewController: DragCardDelegate {
...
@@ -274,6 +294,7 @@ extension YHMatchPeopleViewController: DragCardDelegate {
public
func
dragCard
(
_
dragCard
:
DragCardContainer
,
didRemovedLast
cardView
:
DragCardView
)
{
public
func
dragCard
(
_
dragCard
:
DragCardContainer
,
didRemovedLast
cardView
:
DragCardView
)
{
print
(
"didRemovedLast"
)
print
(
"didRemovedLast"
)
self
.
noDataView
.
isHidden
=
false
}
}
public
func
dragCard
(
_
dragCard
:
DragCardContainer
,
didSelectTopCardAt
index
:
Int
,
with
cardView
:
DragCardView
)
{
public
func
dragCard
(
_
dragCard
:
DragCardContainer
,
didSelectTopCardAt
index
:
Int
,
with
cardView
:
DragCardView
)
{
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHFriendRequestView.swift
View file @
5ec6348c
...
@@ -10,10 +10,15 @@ import UIKit
...
@@ -10,10 +10,15 @@ import UIKit
class
YHFriendRequestView
:
UIView
{
class
YHFriendRequestView
:
UIView
{
var
sendBlock
:((
String
?)
->
())?
static
let
cardHeight
=
313.0
let
textMaxCount
=
10
// 底层蒙版
// 底层蒙版
lazy
var
blackMaskView
:
UIView
=
{
lazy
var
blackMaskView
:
UIView
=
{
let
view
=
UIView
()
let
view
=
UIView
()
view
.
backgroundColor
=
.
alertMaskColor
view
.
backgroundColor
=
.
alertMaskColor
let
tap
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
didMaskViewClicked
)
)
view
.
addGestureRecognizer
(
tap
)
return
view
return
view
}()
}()
...
@@ -60,11 +65,21 @@ class YHFriendRequestView: UIView {
...
@@ -60,11 +65,21 @@ class YHFriendRequestView: UIView {
return
view
return
view
}()
}()
lazy
var
msgLabel
:
UILabel
=
{
lazy
var
textView
:
UITextView
=
{
let
view
=
UITextView
()
view
.
textColor
=
.
mainTextColor70
view
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
view
.
backgroundColor
=
.
clear
view
.
delegate
=
self
return
view
}()
lazy
var
textCountLabel
:
UILabel
=
{
let
label
=
UILabel
()
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
mainTextColor50
label
.
textColor
=
UIColor
.
mainTextColor30
label
.
textAlignment
=
.
left
label
.
textAlignment
=
.
right
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
13
)
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
text
=
"0/
\(
self
.
textMaxCount
)
"
return
label
return
label
}()
}()
...
@@ -119,11 +134,28 @@ class YHFriendRequestView: UIView {
...
@@ -119,11 +134,28 @@ class YHFriendRequestView: UIView {
}
}
@objc
func
didSendBtnClicked
()
{
@objc
func
didSendBtnClicked
()
{
self
.
sendBlock
?(
self
.
textView
.
text
)
dismiss
()
dismiss
()
}
}
@objc
func
didMaskViewClicked
()
{
self
.
endEditing
(
true
)
}
func
addKeyBoardNotify
()
{
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
handleKeyboardNotification(_:)
)
,
name
:
UIResponder
.
keyboardWillShowNotification
,
object
:
nil
)
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
handleKeyboardNotification(_:)
)
,
name
:
UIResponder
.
keyboardWillHideNotification
,
object
:
nil
)
}
deinit
{
NotificationCenter
.
default
.
removeObserver
(
self
)
}
func
createUI
()
{
func
createUI
()
{
addKeyBoardNotify
()
self
.
addSubview
(
self
.
blackMaskView
)
self
.
addSubview
(
self
.
blackMaskView
)
self
.
addSubview
(
cardView
)
self
.
addSubview
(
cardView
)
cardView
.
addSubview
(
headImgV
)
cardView
.
addSubview
(
headImgV
)
...
@@ -132,7 +164,8 @@ class YHFriendRequestView: UIView {
...
@@ -132,7 +164,8 @@ class YHFriendRequestView: UIView {
cardView
.
addSubview
(
professionalLabel
)
cardView
.
addSubview
(
professionalLabel
)
cardView
.
addSubview
(
msgContentView
)
cardView
.
addSubview
(
msgContentView
)
msgContentView
.
addSubview
(
msgLabel
)
msgContentView
.
addSubview
(
textView
)
msgContentView
.
addSubview
(
textCountLabel
)
cardView
.
addSubview
(
cancelBtn
)
cardView
.
addSubview
(
cancelBtn
)
cardView
.
addSubview
(
sendBtn
)
cardView
.
addSubview
(
sendBtn
)
...
@@ -140,7 +173,6 @@ class YHFriendRequestView: UIView {
...
@@ -140,7 +173,6 @@ class YHFriendRequestView: UIView {
self
.
headImgV
.
backgroundColor
=
.
red
self
.
headImgV
.
backgroundColor
=
.
red
self
.
nameLabel
.
text
=
"XASAFSDFASDXASAFSDFASDXASAFSDFASDXASAFSDFASD"
self
.
nameLabel
.
text
=
"XASAFSDFASDXASAFSDFASDXASAFSDFASDXASAFSDFASD"
self
.
professionalLabel
.
text
=
"咨询副总监 | 资讯科技及电讯"
self
.
professionalLabel
.
text
=
"咨询副总监 | 资讯科技及电讯"
self
.
msgLabel
.
text
=
"sdfasdfasdfasfasfasfasfasdfasdfas"
blackMaskView
.
snp
.
makeConstraints
{
make
in
blackMaskView
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
make
.
edges
.
equalToSuperview
()
...
@@ -149,8 +181,8 @@ class YHFriendRequestView: UIView {
...
@@ -149,8 +181,8 @@ class YHFriendRequestView: UIView {
cardView
.
snp
.
makeConstraints
{
make
in
cardView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
38
)
make
.
left
.
equalTo
(
38
)
make
.
right
.
equalTo
(
-
38
)
make
.
right
.
equalTo
(
-
38
)
make
.
centerY
.
equalToSuperview
(
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
(
KScreenHeight
-
YHFriendRequestView
.
cardHeight
)
/
2.0
)
make
.
height
.
equalTo
(
313
)
make
.
height
.
equalTo
(
Self
.
cardHeight
)
}
}
headImgV
.
snp
.
makeConstraints
{
make
in
headImgV
.
snp
.
makeConstraints
{
make
in
...
@@ -187,9 +219,17 @@ class YHFriendRequestView: UIView {
...
@@ -187,9 +219,17 @@ class YHFriendRequestView: UIView {
make
.
height
.
equalTo
(
140
)
make
.
height
.
equalTo
(
140
)
}
}
self
.
msgLabel
.
snp
.
makeConstraints
{
make
in
self
.
textView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
top
.
equalTo
(
6
)
make
.
left
.
top
.
equalTo
(
16
)
make
.
right
.
bottom
.
equalTo
(
-
6
)
make
.
right
.
equalTo
(
-
16
)
}
self
.
textCountLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
top
.
equalTo
(
self
.
textView
.
snp
.
bottom
)
.
offset
(
16
)
make
.
height
.
equalTo
(
16
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
16
)
}
}
self
.
cancelBtn
.
snp
.
makeConstraints
{
make
in
self
.
cancelBtn
.
snp
.
makeConstraints
{
make
in
...
@@ -206,4 +246,35 @@ class YHFriendRequestView: UIView {
...
@@ -206,4 +246,35 @@ class YHFriendRequestView: UIView {
make
.
height
.
equalTo
(
45
)
make
.
height
.
equalTo
(
45
)
}
}
}
}
@objc
func
handleKeyboardNotification
(
_
notification
:
Notification
)
{
if
notification
.
userInfo
!=
nil
{
guard
let
keyboardFrame
=
(
notification
.
userInfo
?[
UIResponder
.
keyboardFrameEndUserInfoKey
]
as
AnyObject
)
.
cgRectValue
else
{
return
}
let
isKeyboardShow
=
notification
.
name
==
UIResponder
.
keyboardWillShowNotification
let
bottomMargin
=
(
isKeyboardShow
?
keyboardFrame
.
height
:
(
KScreenHeight
-
YHFriendRequestView
.
cardHeight
)
/
2.0
)
self
.
cardView
.
snp
.
updateConstraints
{
make
in
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
bottomMargin
)
}
self
.
setNeedsLayout
()
self
.
layoutIfNeeded
()
}
}
}
extension
YHFriendRequestView
:
UITextViewDelegate
{
func
textViewDidChange
(
_
textView
:
UITextView
)
{
self
.
textCountLabel
.
text
=
"
\(
textView
.
text
.
count
)
/
\(
self
.
textMaxCount
)
"
}
func
textView
(
_
textView
:
UITextView
,
shouldChangeTextIn
range
:
NSRange
,
replacementText
text
:
String
)
->
Bool
{
if
text
.
isEmpty
{
return
true
}
let
newLength
=
(
textView
.
text
as
NSString
)
.
length
+
text
.
count
-
range
.
length
return
newLength
<=
self
.
textMaxCount
}
}
}
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHNameCardInfoView.swift
View file @
5ec6348c
...
@@ -14,14 +14,6 @@ class YHNameCardInfoView: DragCardView {
...
@@ -14,14 +14,6 @@ class YHNameCardInfoView: DragCardView {
static
let
height
=
456.0
static
let
height
=
456.0
static
let
width
=
KScreenWidth
-
36.0
*
2
static
let
width
=
KScreenWidth
-
36.0
*
2
lazy
var
cardView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
3.0
view
.
clipsToBounds
=
true
return
view
}()
lazy
var
bgImgV
:
UIImageView
=
{
lazy
var
bgImgV
:
UIImageView
=
{
let
view
=
UIImageView
()
let
view
=
UIImageView
()
view
.
image
=
UIImage
(
named
:
"people_card_head_bg"
)
view
.
image
=
UIImage
(
named
:
"people_card_head_bg"
)
...
@@ -89,7 +81,8 @@ class YHNameCardInfoView: DragCardView {
...
@@ -89,7 +81,8 @@ class YHNameCardInfoView: DragCardView {
override
init
(
frame
:
CGRect
)
{
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
super
.
init
(
frame
:
frame
)
createUI
()
initUI
()
setupUI
()
}
}
required
init
?(
coder
:
NSCoder
)
{
required
init
?(
coder
:
NSCoder
)
{
...
@@ -97,7 +90,15 @@ class YHNameCardInfoView: DragCardView {
...
@@ -97,7 +90,15 @@ class YHNameCardInfoView: DragCardView {
}
}
@objc
func
didBottomBtnClicked
()
{
@objc
func
didBottomBtnClicked
()
{
YHFriendRequestView
.
createView
()
.
show
()
let
view
=
YHFriendRequestView
.
createView
()
view
.
sendBlock
=
{
[
weak
self
]
text
in
guard
let
self
=
self
else
{
return
}
self
.
bottomBtn
.
setTitle
(
"已发送好友申请"
,
for
:
.
normal
)
self
.
bottomBtn
.
backgroundColor
=
.
brandMainColor30
self
.
bottomBtn
.
isUserInteractionEnabled
=
false
}
view
.
show
()
}
}
static
func
createCardView
()
->
YHNameCardInfoView
{
static
func
createCardView
()
->
YHNameCardInfoView
{
...
@@ -111,25 +112,27 @@ class YHNameCardInfoView: DragCardView {
...
@@ -111,25 +112,27 @@ class YHNameCardInfoView: DragCardView {
}
}
func
createUI
()
{
private
func
initUI
()
{
self
.
addSubview
(
self
.
cardView
)
self
.
backgroundColor
=
.
white
cardView
.
addSubview
(
self
.
bgImgV
)
self
.
layer
.
cornerRadius
=
3.0
cardView
.
addSubview
(
self
.
headImgV
)
self
.
clipsToBounds
=
true
cardView
.
addSubview
(
self
.
signImgV
)
}
cardView
.
addSubview
(
self
.
nameLabel
)
cardView
.
addSubview
(
self
.
professionalLabel
)
private
func
setupUI
()
{
cardView
.
addSubview
(
self
.
grayContentView
)
self
.
contentView
.
addSubview
(
self
.
bgImgV
)
self
.
contentView
.
addSubview
(
self
.
headImgV
)
self
.
contentView
.
addSubview
(
self
.
signImgV
)
self
.
contentView
.
addSubview
(
self
.
nameLabel
)
self
.
contentView
.
addSubview
(
self
.
professionalLabel
)
self
.
contentView
.
addSubview
(
self
.
grayContentView
)
grayContentView
.
addSubview
(
self
.
detailLabel
)
grayContentView
.
addSubview
(
self
.
detailLabel
)
card
View
.
addSubview
(
self
.
bottomBtn
)
self
.
content
View
.
addSubview
(
self
.
bottomBtn
)
nameLabel
.
text
=
"阿斯顿法师
打发沙发上
"
nameLabel
.
text
=
"阿斯顿法师"
professionalLabel
.
text
=
"啊发沙发沙发沙发沙发沙发三大发沙发的算法的算法的沙发沙发萨达1"
professionalLabel
.
text
=
"啊发沙发沙发沙发沙发沙发三大发沙发的算法的算法的沙发沙发萨达1"
detailLabel
.
text
=
"阿萨法法师懂法守法萨芬沙发沙发发说法发生发顺丰"
detailLabel
.
text
=
"阿萨法法师懂法守法萨芬沙发沙发发说法发生发顺丰"
self
.
cardView
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
}
self
.
bgImgV
.
snp
.
makeConstraints
{
make
in
self
.
bgImgV
.
snp
.
makeConstraints
{
make
in
make
.
left
.
top
.
right
.
equalToSuperview
()
make
.
left
.
top
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
180
)
make
.
height
.
equalTo
(
180
)
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHPeopleMatchNoDataView.swift
0 → 100644
View file @
5ec6348c
//
// YHPeopleMatchNoDataView.swift
// galaxy
//
// Created by edy on 2024/6/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHPeopleMatchNoDataView
:
UIView
{
static
let
height
=
198.0
lazy
var
bgImgView
:
UIImageView
=
{
let
view
=
UIImageView
(
image
:
UIImage
(
named
:
"people_match_no_data_bg"
))
return
view
}()
lazy
var
titleLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
white
label
.
textAlignment
=
.
center
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
label
.
text
=
"本轮智能匹配人脉已到底~"
return
label
}()
lazy
var
rematchBtn
:
UIButton
=
{
let
btn
=
UIButton
()
btn
.
setTitle
(
"再次智能匹配"
,
for
:
.
normal
)
btn
.
backgroundColor
=
.
brandMainColor
btn
.
setTitleColor
(
.
white
,
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
.
PFSC_M
(
ofSize
:
15
)
btn
.
layer
.
cornerRadius
=
3
btn
.
addTarget
(
self
,
action
:
#selector(
didRematchBtnClicked
)
,
for
:
.
touchUpInside
)
return
btn
}()
lazy
var
relookBtn
:
UIButton
=
{
let
btn
=
UIButton
()
btn
.
setTitle
(
"重新查看"
,
for
:
.
normal
)
btn
.
backgroundColor
=
.
clear
btn
.
setTitleColor
(
.
white
,
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
.
PFSC_M
(
ofSize
:
13
)
btn
.
layer
.
cornerRadius
=
3
btn
.
layer
.
borderWidth
=
1.0
btn
.
layer
.
borderColor
=
UIColor
.
white
.
cgColor
btn
.
addTarget
(
self
,
action
:
#selector(
didRelookBtnClicked
)
,
for
:
.
touchUpInside
)
return
btn
}()
@objc
func
didRematchBtnClicked
()
{
}
@objc
func
didRelookBtnClicked
()
{
}
static
func
createView
()
->
YHPeopleMatchNoDataView
{
let
view
=
YHPeopleMatchNoDataView
(
frame
:
CGRectMake
(
0
,
0
,
KScreenWidth
,
Self
.
height
))
return
view
}
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
createUI
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
func
createUI
()
{
self
.
addSubview
(
self
.
bgImgView
)
self
.
addSubview
(
self
.
titleLabel
)
self
.
addSubview
(
self
.
relookBtn
)
self
.
bgImgView
.
snp
.
makeConstraints
{
make
in
make
.
width
.
equalTo
(
177
)
make
.
height
.
equalTo
(
88
)
make
.
centerX
.
equalToSuperview
()
make
.
top
.
equalToSuperview
()
}
self
.
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
self
.
bgImgView
.
snp
.
bottom
)
.
offset
(
30
)
make
.
height
.
equalTo
(
20
)
make
.
centerX
.
equalToSuperview
()
}
self
.
relookBtn
.
snp
.
makeConstraints
{
make
in
make
.
width
.
equalTo
(
110
)
make
.
height
.
equalTo
(
38
)
make
.
centerX
.
equalToSuperview
()
make
.
top
.
equalTo
(
self
.
titleLabel
.
snp
.
bottom
)
.
offset
(
22
)
}
}
}
galaxy/galaxy/Classes/Tools/Extention/UIColor+Extension.swift
View file @
5ec6348c
...
@@ -17,6 +17,9 @@ extension UIColor {
...
@@ -17,6 +17,9 @@ extension UIColor {
//品牌渐变色
//品牌渐变色
static
let
arrBrandGradaterColors
:
[
UIColor
]
=
[
UIColor
(
hexString
:
"#0046B4"
)
!
,
UIColor
(
hexString
:
"#0046B4"
)
!
]
static
let
arrBrandGradaterColors
:
[
UIColor
]
=
[
UIColor
(
hexString
:
"#0046B4"
)
!
,
UIColor
(
hexString
:
"#0046B4"
)
!
]
//品牌主色 30
static
let
brandMainColor30
:
UIColor
=
UIColor
(
hexString
:
"#0046B4"
,
transparency
:
0.3
)
!
//品牌主色 16
//品牌主色 16
static
let
brandMainColor16
:
UIColor
=
UIColor
(
hexString
:
"#0046B4"
,
transparency
:
0.16
)
!
static
let
brandMainColor16
:
UIColor
=
UIColor
(
hexString
:
"#0046B4"
,
transparency
:
0.16
)
!
...
@@ -26,6 +29,8 @@ extension UIColor {
...
@@ -26,6 +29,8 @@ extension UIColor {
//品牌主色 6
//品牌主色 6
static
let
brandMainColor6
:
UIColor
=
UIColor
(
hexString
:
"#0046B4"
,
transparency
:
0.06
)
!
static
let
brandMainColor6
:
UIColor
=
UIColor
(
hexString
:
"#0046B4"
,
transparency
:
0.06
)
!
//标题/主内容
//标题/主内容
// static let mainTextColor : UIColor = UIColor(hexString: "#222222")!
// static let mainTextColor : UIColor = UIColor(hexString: "#222222")!
static
let
mainTextColor
:
UIColor
=
UIColor
(
hexString
:
"#121A26"
)
!
static
let
mainTextColor
:
UIColor
=
UIColor
(
hexString
:
"#121A26"
)
!
...
...
galaxy/galaxy/Res/Assets.xcassets/People/people_match_no_data_bg.imageset/Contents.json
0 → 100644
View file @
5ec6348c
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Group 2033195118@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Group 2033195118@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/People/people_match_no_data_bg.imageset/Group 2033195118@2x.png
0 → 100644
View file @
5ec6348c
27 KB
galaxy/galaxy/Res/Assets.xcassets/People/people_match_no_data_bg.imageset/Group 2033195118@3x.png
0 → 100644
View file @
5ec6348c
55 KB
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