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
930e910b
Commit
930e910b
authored
Jun 18, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 我的好友空视图
parent
a88fbdcb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
3 deletions
+55
-3
YHEmptyDataView.swift
galaxy/galaxy/Classes/Base/V/YHEmptyDataView.swift
+2
-1
YHMyGoodFriendsVC.swift
...y/Classes/Modules/Community(社区)/C/YHMyGoodFriendsVC.swift
+19
-2
YHFriendsRequestView.swift
...lasses/Modules/Community(社区)/V/YHFriendsRequestView.swift
+12
-0
Contents.json
...cassets/People/people_no_friend_bg.imageset/Contents.json
+22
-0
Group 2033195119@2x.png
...ople/people_no_friend_bg.imageset/Group 2033195119@2x.png
+0
-0
Group 2033195119@3x.png
...ople/people_no_friend_bg.imageset/Group 2033195119@3x.png
+0
-0
No files found.
galaxy/galaxy/Classes/Base/V/YHEmptyDataView.swift
View file @
930e910b
...
@@ -18,7 +18,8 @@ let kEmptyMessageBgName = "no_data_bg_msg"
...
@@ -18,7 +18,8 @@ let kEmptyMessageBgName = "no_data_bg_msg"
let
kEmptyOrderBgName
=
"no_data_bg_order"
let
kEmptyOrderBgName
=
"no_data_bg_order"
// 无网络空视图
// 无网络空视图
let
kNotNetWorkBgName
=
"no_network_bg"
let
kNotNetWorkBgName
=
"no_network_bg"
// 人脉无好友空视图
let
kNoFriendsBgName
=
"people_no_friend_bg"
class
YHEmptyDataView
:
UIView
{
class
YHEmptyDataView
:
UIView
{
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/C/YHMyGoodFriendsVC.swift
View file @
930e910b
...
@@ -22,15 +22,29 @@ class YHMyGoodFriendsVC: YHBaseViewController {
...
@@ -22,15 +22,29 @@ class YHMyGoodFriendsVC: YHBaseViewController {
tableView
.
register
(
YHMyFriendsCell
.
self
,
forCellReuseIdentifier
:
YHMyFriendsCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHMyFriendsCell
.
self
,
forCellReuseIdentifier
:
YHMyFriendsCell
.
cellReuseIdentifier
)
tableView
.
contentInset
=
UIEdgeInsets
(
top
:
YHFriendsRequestView
.
height
+
16
,
left
:
0
,
bottom
:
0
,
right
:
0
)
tableView
.
contentInset
=
UIEdgeInsets
(
top
:
YHFriendsRequestView
.
height
+
16
,
left
:
0
,
bottom
:
0
,
right
:
0
)
tableView
.
addSubview
(
self
.
friendRequestView
)
tableView
.
addSubview
(
self
.
friendRequestView
)
tableView
.
backgroundView
=
self
.
emptyDataTipsView
return
tableView
return
tableView
}()
}()
lazy
var
friendRequestView
:
YHFriendsRequestView
=
{
lazy
var
friendRequestView
:
YHFriendsRequestView
=
{
let
view
=
YHFriendsRequestView
(
frame
:
CGRectMake
(
0
,
-
16
-
YHFriendsRequestView
.
height
,
KScreenWidth
-
16*
2
,
YHFriendsRequestView
.
height
))
let
view
=
YHFriendsRequestView
(
frame
:
CGRectMake
(
0
,
-
16
-
YHFriendsRequestView
.
height
,
KScreenWidth
-
16*
2
,
YHFriendsRequestView
.
height
))
view
.
acceptBlock
=
{
[
weak
self
]
accept
in
guard
let
self
=
self
else
{
return
}
self
.
tableView
.
contentInset
=
UIEdgeInsets
.
zero
self
.
friendRequestView
.
removeFromSuperview
()
}
return
view
return
view
}()
}()
var
friendsArr
:[
String
]
=
[
""
,
""
,
""
,
""
]
lazy
var
emptyDataTipsView
:
YHEmptyDataView
=
{
let
view
=
YHEmptyDataView
.
createView
(
"暂无好友"
,
kNoFriendsBgName
)
view
.
topMargin
=
222
view
.
isHidden
=
true
return
view
}()
var
friendsArr
:[
String
]
=
[]
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
...
@@ -50,7 +64,10 @@ class YHMyGoodFriendsVC: YHBaseViewController {
...
@@ -50,7 +64,10 @@ class YHMyGoodFriendsVC: YHBaseViewController {
extension
YHMyGoodFriendsVC
:
UITableViewDelegate
,
UITableViewDataSource
{
extension
YHMyGoodFriendsVC
:
UITableViewDelegate
,
UITableViewDataSource
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
return
1
if
self
.
friendsArr
.
count
>
0
{
return
1
}
return
0
}
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHFriendsRequestView.swift
View file @
930e910b
...
@@ -10,6 +10,8 @@ import UIKit
...
@@ -10,6 +10,8 @@ import UIKit
class
YHFriendsRequestView
:
UIView
{
class
YHFriendsRequestView
:
UIView
{
var
acceptBlock
:((
Bool
)
->
())?
static
let
height
=
218.0
static
let
height
=
218.0
lazy
var
titleLabel
:
UILabel
=
{
lazy
var
titleLabel
:
UILabel
=
{
...
@@ -80,6 +82,7 @@ class YHFriendsRequestView: UIView {
...
@@ -80,6 +82,7 @@ class YHFriendsRequestView: UIView {
btn
.
setTitleColor
(
UIColor
(
hexString
:
"#222222"
),
for
:
.
normal
)
btn
.
setTitleColor
(
UIColor
(
hexString
:
"#222222"
),
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
.
PFSC_M
(
ofSize
:
13.6
)
btn
.
titleLabel
?
.
font
=
.
PFSC_M
(
ofSize
:
13.6
)
btn
.
layer
.
cornerRadius
=
2.75
btn
.
layer
.
cornerRadius
=
2.75
btn
.
addTarget
(
self
,
action
:
#selector(
didIgnoreBtnClicked
)
,
for
:
.
touchUpInside
)
return
btn
return
btn
}()
}()
...
@@ -90,6 +93,7 @@ class YHFriendsRequestView: UIView {
...
@@ -90,6 +93,7 @@ class YHFriendsRequestView: UIView {
btn
.
setTitleColor
(
UIColor
.
white
,
for
:
.
normal
)
btn
.
setTitleColor
(
UIColor
.
white
,
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
.
PFSC_M
(
ofSize
:
13.6
)
btn
.
titleLabel
?
.
font
=
.
PFSC_M
(
ofSize
:
13.6
)
btn
.
layer
.
cornerRadius
=
2.75
btn
.
layer
.
cornerRadius
=
2.75
btn
.
addTarget
(
self
,
action
:
#selector(
didAcceptBtnClicked
)
,
for
:
.
touchUpInside
)
return
btn
return
btn
}()
}()
...
@@ -102,6 +106,14 @@ class YHFriendsRequestView: UIView {
...
@@ -102,6 +106,14 @@ class YHFriendsRequestView: UIView {
fatalError
(
"init(coder:) has not been implemented"
)
fatalError
(
"init(coder:) has not been implemented"
)
}
}
@objc
func
didIgnoreBtnClicked
()
{
self
.
acceptBlock
?(
true
)
}
@objc
func
didAcceptBtnClicked
()
{
self
.
acceptBlock
?(
false
)
}
func
createUI
()
{
func
createUI
()
{
self
.
addSubview
(
titleLabel
)
self
.
addSubview
(
titleLabel
)
self
.
addSubview
(
cardView
)
self
.
addSubview
(
cardView
)
...
...
galaxy/galaxy/Res/Assets.xcassets/People/people_no_friend_bg.imageset/Contents.json
0 → 100644
View file @
930e910b
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Group 2033195119@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Group 2033195119@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/People/people_no_friend_bg.imageset/Group 2033195119@2x.png
0 → 100644
View file @
930e910b
4.17 KB
galaxy/galaxy/Res/Assets.xcassets/People/people_no_friend_bg.imageset/Group 2033195119@3x.png
0 → 100644
View file @
930e910b
6.2 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