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
1dd75869
Commit
1dd75869
authored
Sep 26, 2025
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 名片
parent
e9d95717
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
433 additions
and
16 deletions
+433
-16
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+32
-0
YHConnectListViewController.swift
...y(社区)/Connections(人脉)/C/YHConnectListViewController.swift
+13
-16
YHNameCardHomePageViewController.swift
...我的)/NameCard(名片)/C/YHNameCardHomePageViewController.swift
+31
-0
YHNewNameCardViewController.swift
...Mine(我的)/NameCard(名片)/C/YHNewNameCardViewController.swift
+285
-0
Contents.json
galaxy/galaxy/Res/Assets.xcassets/nameCard/Contents.json
+6
-0
Contents.json
...ssets/nameCard/name_card_authorize.imageset/Contents.json
+22
-0
右侧@2x.png
....xcassets/nameCard/name_card_authorize.imageset/右侧@2x.png
+0
-0
右侧@3x.png
....xcassets/nameCard/name_card_authorize.imageset/右侧@3x.png
+0
-0
Contents.json
...ets.xcassets/nameCard/name_card_bg.imageset/Contents.json
+22
-0
头部背景图-1.png
...ssets.xcassets/nameCard/name_card_bg.imageset/头部背景图-1.png
+0
-0
头部背景图.png
.../Assets.xcassets/nameCard/name_card_bg.imageset/头部背景图.png
+0
-0
24pt业务-1.png
...ts.xcassets/nameCard/name_card_edit.imageset/24pt业务-1.png
+0
-0
24pt业务.png
...sets.xcassets/nameCard/name_card_edit.imageset/24pt业务.png
+0
-0
Contents.json
...s.xcassets/nameCard/name_card_edit.imageset/Contents.json
+22
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
1dd75869
...
...
@@ -39,6 +39,7 @@
041CCDF72D7ED9030015E7BC
/* YHHKVisaRenewalPaymentInfoList.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
041CCDF62D7ED9030015E7BC
/* YHHKVisaRenewalPaymentInfoList.swift */
;
};
041CCDF92D7EE8B90015E7BC
/* YHVisaRenewalPayMemberCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
041CCDF82D7EE8B90015E7BC
/* YHVisaRenewalPayMemberCell.swift */
;
};
0426E09A2E84E962005C9F5D
/* YHContact.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0426E0992E84E962005C9F5D
/* YHContact.swift */
;
};
0426E09C2E851A91005C9F5D
/* YHNewNameCardViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0426E09B2E851A91005C9F5D
/* YHNewNameCardViewController.swift */
;
};
04307B662D1942F500ED8E8D
/* YHDynamicSheetPickerView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B652D1942F500ED8E8D
/* YHDynamicSheetPickerView.swift */
;
};
04307B682D19911800ED8E8D
/* YHIncomeInfoEditCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B672D19911800ED8E8D
/* YHIncomeInfoEditCell.swift */
;
};
04307B6A2D1A4C6500ED8E8D
/* YHIncomeInfoSelectCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B692D1A4C6500ED8E8D
/* YHIncomeInfoSelectCell.swift */
;
};
...
...
@@ -1254,6 +1255,7 @@
04B00FC72D9A420F00F640C5
/* YHMakePlanPriceAlertView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04B00FB82D9A420F00F640C5
/* YHMakePlanPriceAlertView.swift */
;
};
04B00FC82D9A420F00F640C5
/* YHMakePlanCusttomHeadView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04B00FB62D9A420F00F640C5
/* YHMakePlanCusttomHeadView.swift */
;
};
04B00FCA2D9AAD6100F640C5
/* YHMakePlanTopView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04B00FC92D9AAD6100F640C5
/* YHMakePlanTopView.swift */
;
};
04B30B7B2E86307C004E4B12
/* YHNameCardHomePageViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04B30B7A2E86307C004E4B12
/* YHNameCardHomePageViewController.swift */
;
};
04D4EC312E839C1000B0329B
/* YHCircleViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04D4EC302E839C1000B0329B
/* YHCircleViewController.swift */
;
};
04D4EC332E839C2B00B0329B
/* YHResourceViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04D4EC322E839C2B00B0329B
/* YHResourceViewController.swift */
;
};
04D6405A2E84DF07000162AF
/* YHConnectListViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04D640592E84DF07000162AF
/* YHConnectListViewController.swift */
;
};
...
...
@@ -1379,6 +1381,7 @@
041CCDF62D7ED9030015E7BC
/* YHHKVisaRenewalPaymentInfoList.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHKVisaRenewalPaymentInfoList.swift
;
sourceTree
=
"<group>"
;
};
041CCDF82D7EE8B90015E7BC
/* YHVisaRenewalPayMemberCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHVisaRenewalPayMemberCell.swift
;
sourceTree
=
"<group>"
;
};
0426E0992E84E962005C9F5D
/* YHContact.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHContact.swift
;
sourceTree
=
"<group>"
;
};
0426E09B2E851A91005C9F5D
/* YHNewNameCardViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHNewNameCardViewController.swift
;
sourceTree
=
"<group>"
;
};
04307B652D1942F500ED8E8D
/* YHDynamicSheetPickerView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDynamicSheetPickerView.swift
;
sourceTree
=
"<group>"
;
};
04307B672D19911800ED8E8D
/* YHIncomeInfoEditCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHIncomeInfoEditCell.swift
;
sourceTree
=
"<group>"
;
};
04307B692D1A4C6500ED8E8D
/* YHIncomeInfoSelectCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHIncomeInfoSelectCell.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2599,6 +2602,7 @@
04B00FBA2D9A420F00F640C5
/* YHMakePlanShareAlertView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMakePlanShareAlertView.swift
;
sourceTree
=
"<group>"
;
};
04B00FBB2D9A420F00F640C5
/* YHMakePlanStateHeadView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMakePlanStateHeadView.swift
;
sourceTree
=
"<group>"
;
};
04B00FC92D9AAD6100F640C5
/* YHMakePlanTopView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMakePlanTopView.swift
;
sourceTree
=
"<group>"
;
};
04B30B7A2E86307C004E4B12
/* YHNameCardHomePageViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHNameCardHomePageViewController.swift
;
sourceTree
=
"<group>"
;
};
04D4EC302E839C1000B0329B
/* YHCircleViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCircleViewController.swift
;
sourceTree
=
"<group>"
;
};
04D4EC322E839C2B00B0329B
/* YHResourceViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResourceViewController.swift
;
sourceTree
=
"<group>"
;
};
04D640592E84DF07000162AF
/* YHConnectListViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHConnectListViewController.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -6075,6 +6079,7 @@
045C0EFD2D12CA5E00BD2DC0
/* Mine(我的) */
=
{
isa
=
PBXGroup
;
children
=
(
04B30B7C2E86371E004E4B12
/* NameCard(名片) */
,
045C0ED52D12CA5E00BD2DC0
/* AboutYH */
,
045C0EE12D12CA5E00BD2DC0
/* C */
,
045C0EE32D12CA5E00BD2DC0
/* Model */
,
...
...
@@ -6875,6 +6880,31 @@
path
=
MakePlan
;
sourceTree
=
"<group>"
;
};
04B30B7C2E86371E004E4B12
/* NameCard(名片) */
=
{
isa
=
PBXGroup
;
children
=
(
04B30B7E2E863761004E4B12
/* V */
,
04B30B7D2E86374E004E4B12
/* C */
,
);
path
=
"NameCard(名片)"
;
sourceTree
=
"<group>"
;
};
04B30B7D2E86374E004E4B12
/* C */
=
{
isa
=
PBXGroup
;
children
=
(
0426E09B2E851A91005C9F5D
/* YHNewNameCardViewController.swift */
,
04B30B7A2E86307C004E4B12
/* YHNameCardHomePageViewController.swift */
,
);
path
=
C
;
sourceTree
=
"<group>"
;
};
04B30B7E2E863761004E4B12
/* V */
=
{
isa
=
PBXGroup
;
children
=
(
);
path
=
V
;
sourceTree
=
"<group>"
;
};
04D4EC262E839A0300B0329B
/* Circle(下属社区) */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -8020,6 +8050,7 @@
045C11742D12CA5F00BD2DC0
/* YHSimpleAudienceVC.swift in Sources */
,
045C11752D12CA5F00BD2DC0
/* YHAIProductCell.swift in Sources */
,
045C11762D12CA5F00BD2DC0
/* YHHKRecordsHeaderCell.swift in Sources */
,
04B30B7B2E86307C004E4B12
/* YHNameCardHomePageViewController.swift in Sources */
,
045C11772D12CA5F00BD2DC0
/* YHWorkMessageSelectTableViewCell.swift in Sources */
,
04A750F32D9AB95300974E5F
/* YHSurveyRenewalPlanState.swift in Sources */
,
045C11782D12CA5F00BD2DC0
/* YHResignGuidelinesViewModel.swift in Sources */
,
...
...
@@ -8633,6 +8664,7 @@
045C137C2D12CA5F00BD2DC0
/* YHVisaRenewalPayInfoBaseCell.swift in Sources */
,
045C137D2D12CA5F00BD2DC0
/* YHPaddedLabel.swift in Sources */
,
045C137E2D12CA5F00BD2DC0
/* IMAppKey.swift in Sources */
,
0426E09C2E851A91005C9F5D
/* YHNewNameCardViewController.swift in Sources */
,
045C137F2D12CA5F00BD2DC0
/* YHHomeWebViewBottomForSavePicView.swift in Sources */
,
045C13802D12CA5F00BD2DC0
/* YHLifeViewController.swift in Sources */
,
045C13812D12CA5F00BD2DC0
/* YHParentInfoVC.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/Connections(人脉)/C/YHConnectListViewController.swift
View file @
1dd75869
...
...
@@ -6,11 +6,10 @@
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
JXSegmentedView
import
UIKit
class
YHConnectListViewController
:
YHBaseViewController
{
let
viewModel
=
YHMatchUserViewModel
()
var
arr
:
[
String
]
=
[
""
,
""
,
""
]
...
...
@@ -23,9 +22,9 @@ class YHConnectListViewController: YHBaseViewController {
tableView
.
register
(
YHConnectListCell
.
self
,
forCellReuseIdentifier
:
YHConnectListCell
.
cellReuseIdentifier
)
return
tableView
}()
lazy
var
emptyDataTipsView
:
YHMyFriendsNoDataView
=
{
let
view
=
YHMyFriendsNoDataView
(
frame
:
CGRect
(
x
:
0
,
y
:
k_Height_NavigationtBarAndStatuBar
,
width
:
KScreenWidth
,
height
:
KScreenHeight
-
k_Height_NavigationtBarAndStatuBar
))
let
view
=
YHMyFriendsNoDataView
(
frame
:
CGRect
(
x
:
0
,
y
:
k_Height_NavigationtBarAndStatuBar
,
width
:
KScreenWidth
,
height
:
KScreenHeight
-
k_Height_NavigationtBarAndStatuBar
))
view
.
bottomBtnClick
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
...
...
@@ -38,10 +37,10 @@ class YHConnectListViewController: YHBaseViewController {
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
gk_navigationBar
.
isHidden
=
true
self
.
view
.
backgroundColor
=
UIColor
.
white
self
.
view
.
addSubview
(
self
.
tableView
)
self
.
view
.
addSubview
(
self
.
emptyDataTipsView
)
self
.
tableView
.
snp
.
makeConstraints
{
make
in
view
.
backgroundColor
=
UIColor
.
white
view
.
addSubview
(
tableView
)
view
.
addSubview
(
emptyDataTipsView
)
tableView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
0
)
make
.
right
.
equalTo
(
0
)
make
.
bottom
.
equalToSuperview
()
...
...
@@ -51,25 +50,23 @@ class YHConnectListViewController: YHBaseViewController {
}
extension
YHConnectListViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
arr
.
count
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHConnectListCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHConnectListCell
else
{
return
UITableViewCell
()
}
return
cell
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
UITableView
.
automaticDimension
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
self
.
arr
.
count
{
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
arr
.
count
{
let
vc
=
YHNewNameCardViewController
()
navigationController
?
.
pushViewController
(
vc
)
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/NameCard(名片)/C/YHNameCardHomePageViewController.swift
0 → 100644
View file @
1dd75869
//
// YHNameCardHomePageViewController.swift
// galaxy
//
// Created by Dufet on 2025/9/26.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
JXSegmentedView
class
YHNameCardHomePageViewController
:
YHBaseViewController
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
.
white
gk_navigationBar
.
isHidden
=
true
createUI
()
}
func
createUI
()
{
}
}
extension
YHNameCardHomePageViewController
:
JXSegmentedListContainerViewListDelegate
{
func
listView
()
->
UIView
{
return
view
}
}
galaxy/galaxy/Classes/Modules/Mine(我的)/NameCard(名片)/C/YHNewNameCardViewController.swift
0 → 100644
View file @
1dd75869
//
// YHMyNewNameCardViewController.swift
// galaxy
//
// Created by Dufet on 2025/9/25.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import
AttributedString
import
JXSegmentedView
import
UIKit
class
YHNewNameCardViewController
:
YHBaseViewController
{
var
defaultIndex
=
0
lazy
var
headerView
:
UIView
=
{
let
view
=
UIView
()
view
.
clipsToBounds
=
true
view
.
backgroundColor
=
UIColor
(
hexString
:
"#E2E3E8"
)
let
bgImgView
=
UIImageView
()
bgImgView
.
image
=
UIImage
(
named
:
"name_card_bg"
)
view
.
addSubview
(
bgImgView
)
bgImgView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
height
.
equalTo
(
bgImgView
.
snp
.
width
)
.
multipliedBy
(
300.0
/
375.0
)
}
return
view
}()
lazy
var
avatarImgView
:
UIImageView
=
{
let
avatarImgV
=
UIImageView
()
avatarImgV
.
backgroundColor
=
UIColor
.
brandGrayColor8
avatarImgV
.
layer
.
cornerRadius
=
68.0
/
2
avatarImgV
.
clipsToBounds
=
true
return
avatarImgV
}()
lazy
var
editBtn
:
UIButton
=
{
let
btn
=
UIButton
(
type
:
.
custom
)
btn
.
setBackgroundImage
(
UIImage
(
named
:
"name_card_edit"
),
for
:
.
normal
)
return
btn
}()
lazy
var
nameTextView
:
UITextView
=
{
let
textView
=
UITextView
()
textView
.
textColor
=
UIColor
.
brandGrayColor8
textView
.
backgroundColor
=
.
clear
textView
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
21
)
textView
.
isScrollEnabled
=
false
textView
.
isEditable
=
false
textView
.
isSelectable
=
false
return
textView
}()
lazy
var
professionalLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
brandGrayColor8
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
numberOfLines
=
2
return
label
}()
lazy
var
signatureLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
brandGrayColor8
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
label
.
numberOfLines
=
2
return
label
}()
lazy
var
cityLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
brandGrayColor8
label
.
textAlignment
=
.
center
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
10
)
label
.
layer
.
cornerRadius
=
9.0
label
.
layer
.
borderColor
=
UIColor
.
brandGrayColor8
.
cgColor
label
.
layer
.
borderWidth
=
0.5
return
label
}()
lazy
var
zodiacLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
brandGrayColor8
label
.
textAlignment
=
.
center
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
10
)
label
.
layer
.
cornerRadius
=
9.0
label
.
layer
.
borderColor
=
UIColor
.
brandGrayColor8
.
cgColor
label
.
layer
.
borderWidth
=
0.5
label
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
42
,
height
:
18
)
return
label
}()
lazy
var
segmentedDataSource
:
JXSegmentedTitleDataSource
=
{
let
dataSource
=
JXSegmentedTitleDataSource
()
dataSource
.
titles
=
[
"主页"
,
"动态"
]
dataSource
.
titleNormalFont
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
dataSource
.
titleNormalColor
=
.
brandGrayColor7
dataSource
.
titleSelectedFont
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
dataSource
.
titleSelectedColor
=
.
brandGrayColor8
dataSource
.
isItemSpacingAverageEnabled
=
false
dataSource
.
itemWidth
=
32.0
dataSource
.
itemSpacing
=
24.0
return
dataSource
}()
// tab
lazy
var
segmentedView
:
JXSegmentedView
=
{
let
view
=
JXSegmentedView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
30
))
view
.
backgroundColor
=
.
white
return
view
}()
// 分类title 所对应的VC
lazy
var
listContainerView
:
JXSegmentedListContainerView
!
=
{
JXSegmentedListContainerView
(
dataSource
:
self
,
type
:
.
collectionView
)
}()
lazy
var
childrenVC
:
[
YHBaseViewController
]
=
{
let
vc1
=
YHNameCardHomePageViewController
()
let
vc2
=
YHNameCardHomePageViewController
()
let
vcs
:
[
YHBaseViewController
]
=
[
vc1
,
vc2
]
return
vcs
}()
lazy
var
bottomBtn
:
UIButton
=
{
let
btn
=
UIButton
(
type
:
.
custom
)
btn
.
setTitle
(
"发布动态"
,
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
13
)
btn
.
setTitleColor
(
.
white
,
for
:
.
normal
)
btn
.
backgroundColor
=
UIColor
.
brandGrayColor8
btn
.
layer
.
cornerRadius
=
3.0
btn
.
masksToBounds
=
true
return
btn
}()
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
gk_navigationBar
.
backgroundColor
=
.
clear
let
rightButtonItem
=
UIBarButtonItem
(
image
:
UIImage
(
named
:
"name_card_authorize"
)?
.
withRenderingMode
(
.
alwaysOriginal
),
style
:
.
plain
,
target
:
self
,
action
:
#selector(
authorizeBtnClicked
)
)
gk_navRightBarButtonItem
=
rightButtonItem
gk_navItemRightSpace
=
16
createUI
()
}
@objc
func
authorizeBtnClicked
()
{
}
func
createUI
()
{
view
.
backgroundColor
=
.
white
view
.
addSubview
(
headerView
)
headerView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
top
.
equalToSuperview
()
}
headerView
.
addSubview
(
avatarImgView
)
avatarImgView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
top
.
equalTo
(
24
+
k_Height_NavigationtBarAndStatuBar
)
make
.
width
.
height
.
equalTo
(
68
)
}
headerView
.
addSubview
(
editBtn
)
editBtn
.
snp
.
makeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
20
)
make
.
centerY
.
equalTo
(
avatarImgView
)
make
.
right
.
equalTo
(
-
20
)
}
headerView
.
addSubview
(
nameTextView
)
nameTextView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
top
.
equalTo
(
avatarImgView
.
snp
.
bottom
)
.
offset
(
12
)
}
headerView
.
addSubview
(
professionalLabel
)
professionalLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
top
.
equalTo
(
nameTextView
.
snp
.
bottom
)
.
offset
(
4
)
}
headerView
.
addSubview
(
signatureLabel
)
signatureLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
top
.
equalTo
(
professionalLabel
.
snp
.
bottom
)
.
offset
(
6
)
make
.
bottom
.
equalTo
(
-
32
)
}
segmentedView
.
dataSource
=
segmentedDataSource
segmentedView
.
delegate
=
self
view
.
addSubview
(
segmentedView
)
segmentedView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
headerView
.
snp
.
bottom
)
make
.
height
.
equalTo
(
30
)
}
segmentedView
.
listContainer
=
listContainerView
view
.
addSubview
(
listContainerView
)
view
.
addSubview
(
bottomBtn
)
listContainerView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
segmentedView
.
snp
.
bottom
)
.
offset
(
0.0
)
make
.
bottom
.
equalTo
(
bottomBtn
.
snp
.
top
)
.
offset
(
-
8
)
}
bottomBtn
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
height
.
equalTo
(
46
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
10
)
}
// 分类Title
segmentedView
.
dataSource
=
segmentedDataSource
segmentedView
.
delegate
=
self
// 配置指示器
let
indicator
=
JXSegmentedIndicatorLineView
()
indicator
.
indicatorWidth
=
16.0
indicator
.
indicatorHeight
=
2.0
indicator
.
indicatorColor
=
UIColor
.
brandGrayColor8
indicator
.
indicatorCornerRadius
=
0
segmentedView
.
indicators
=
[
indicator
]
segmentedView
.
defaultSelectedIndex
=
defaultIndex
updateModel
()
}
func
updateModel
()
{
let
cityText
=
" 北京市 "
cityLabel
.
text
=
cityText
let
cityWidth
=
getWith
(
font
:
cityLabel
.
font
,
height
:
18
,
string
:
cityText
)
cityLabel
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
cityWidth
+
8
,
height
:
18
)
let
zodiacText
=
" 金牛座 "
zodiacLabel
.
text
=
zodiacText
let
zodiacWidth
=
getWith
(
font
:
zodiacLabel
.
font
,
height
:
18
,
string
:
zodiacText
)
zodiacLabel
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
zodiacWidth
+
8
,
height
:
18
)
// self.signImgV.isHidden = !self.userModel.isSigned
var
name
:
ASAttributedString
=
.
init
(
string
:
"阿萨德减肥啦拒收到付垃圾啊送达了开发机山卡拉"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
21
)),
.
foreground
(
UIColor
.
brandGrayColor8
))
let
cityTag
:
ASAttributedString
=
"
\(
.
view
(
cityLabel
,
.
original
(
.
center
))
)
"
let
zodiacTag
:
ASAttributedString
=
"
\(
.
view
(
zodiacLabel
,
.
original
(
.
center
))
)
"
nameTextView
.
attributed
.
text
=
name
+
cityTag
+
zodiacTag
professionalLabel
.
text
=
"说法舒服多了撒记得发啦手机大发立卡手机大发立卡手机大发卡拉季山卡拉代发金卡拉萨放大机阿卡说法卡拉生发剂凯撒的剪发卡"
signatureLabel
.
text
=
"阿萨德节流阀上课了打飞机阿萨漏打卡飞机王企鹅批发金娃女会计收纳大V江西子女科技哈师大聚哈挖了溶剂法搞起我金卡阿斯加德发卡量世纪东方啦苏卡达飞机阿萨达佛IE秋季日期忘记哦"
}
func
getWith
(
font
:
UIFont
,
height
:
CGFloat
,
string
:
String
)
->
CGFloat
{
let
size
=
CGSize
(
width
:
CGFloat
(
MAXFLOAT
),
height
:
height
)
let
dic
=
[
NSAttributedString
.
Key
.
font
:
font
]
// swift 4.2
let
strSize
=
string
.
boundingRect
(
with
:
size
,
options
:
[
.
usesLineFragmentOrigin
],
attributes
:
dic
,
context
:
nil
)
.
size
return
CGSize
(
width
:
ceil
(
strSize
.
width
),
height
:
strSize
.
height
)
.
width
}
}
extension
YHNewNameCardViewController
:
JXSegmentedViewDelegate
{
func
segmentedView
(
_
segmentedView
:
JXSegmentedView
,
didSelectedItemAt
index
:
Int
)
{
}
func
segmentedView
(
_
segmentedView
:
JXSegmentedView
,
scrollingFrom
leftIndex
:
Int
,
to
rightIndex
:
Int
,
percent
:
CGFloat
)
{
}
}
extension
YHNewNameCardViewController
:
JXSegmentedListContainerViewDataSource
{
func
numberOfLists
(
in
listContainerView
:
JXSegmentedListContainerView
)
->
Int
{
if
let
titleDataSource
=
segmentedView
.
dataSource
as?
JXSegmentedBaseDataSource
{
return
titleDataSource
.
dataSource
.
count
}
return
0
}
func
listContainerView
(
_
listContainerView
:
JXSegmentedListContainerView
,
initListAt
index
:
Int
)
->
JXSegmentedListContainerViewListDelegate
{
guard
let
vc
=
childrenVC
[
index
]
as?
JXSegmentedListContainerViewListDelegate
else
{
return
YHNameCardHomePageViewController
()
}
return
vc
}
}
galaxy/galaxy/Res/Assets.xcassets/nameCard/Contents.json
0 → 100644
View file @
1dd75869
{
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/nameCard/name_card_authorize.imageset/Contents.json
0 → 100644
View file @
1dd75869
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"右侧@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"右侧@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/nameCard/name_card_authorize.imageset/右侧@2x.png
0 → 100644
View file @
1dd75869
2.6 KB
galaxy/galaxy/Res/Assets.xcassets/nameCard/name_card_authorize.imageset/右侧@3x.png
0 → 100644
View file @
1dd75869
3.87 KB
galaxy/galaxy/Res/Assets.xcassets/nameCard/name_card_bg.imageset/Contents.json
0 → 100644
View file @
1dd75869
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"头部背景图.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"头部背景图-1.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/nameCard/name_card_bg.imageset/头部背景图-1.png
0 → 100644
View file @
1dd75869
110 KB
galaxy/galaxy/Res/Assets.xcassets/nameCard/name_card_bg.imageset/头部背景图.png
0 → 100644
View file @
1dd75869
55 KB
galaxy/galaxy/Res/Assets.xcassets/nameCard/name_card_edit.imageset/24pt业务-1.png
0 → 100644
View file @
1dd75869
1.13 KB
galaxy/galaxy/Res/Assets.xcassets/nameCard/name_card_edit.imageset/24pt业务.png
0 → 100644
View file @
1dd75869
708 Bytes
galaxy/galaxy/Res/Assets.xcassets/nameCard/name_card_edit.imageset/Contents.json
0 → 100644
View file @
1dd75869
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"24pt业务.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"24pt业务-1.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
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