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
623bcb8d
Commit
623bcb8d
authored
Apr 17, 2025
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 消息UI
parent
6fec4f66
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
98 additions
and
8 deletions
+98
-8
YHGalaxyNewsListViewController.swift
...odules/Message(消息)/C/YHGalaxyNewsListViewController.swift
+36
-2
YHMessageDetailListVC.swift
...Classes/Modules/Message(消息)/C/YHMessageDetailListVC.swift
+1
-1
YHGalaxyNewsCell.swift
...laxy/Classes/Modules/Message(消息)/V/YHGalaxyNewsCell.swift
+17
-5
Contents.json
...ets/Message/msg_news_cover_default.imageset/Contents.json
+22
-0
Group 2033197585@2x.png
...e/msg_news_cover_default.imageset/Group 2033197585@2x.png
+0
-0
Group 2033197585@3x.png
...e/msg_news_cover_default.imageset/Group 2033197585@3x.png
+0
-0
Contents.json
...assets/Message/msg_news_video_play.imageset/Contents.json
+22
-0
点击播放icon@2x.png
...sets/Message/msg_news_video_play.imageset/点击播放icon@2x.png
+0
-0
点击播放icon@3x.png
...sets/Message/msg_news_video_play.imageset/点击播放icon@3x.png
+0
-0
No files found.
galaxy/galaxy/Classes/Modules/Message(消息)/C/YHGalaxyNewsListViewController.swift
View file @
623bcb8d
...
@@ -14,28 +14,41 @@ class YHGalaxyNewsListViewController: YHBaseViewController {
...
@@ -14,28 +14,41 @@ class YHGalaxyNewsListViewController: YHBaseViewController {
lazy
var
tableView
:
UITableView
=
{
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
if
#available(iOS 15.0, *)
{
tableView
.
sectionHeaderTopPadding
=
0
}
tableView
.
estimatedSectionHeaderHeight
=
1.0
tableView
.
estimatedSectionHeaderHeight
=
1.0
tableView
.
estimatedSectionFooterHeight
=
1.0
tableView
.
estimatedSectionFooterHeight
=
1.0
tableView
.
showsVerticalScrollIndicator
=
false
tableView
.
showsVerticalScrollIndicator
=
false
tableView
.
separatorStyle
=
.
none
tableView
.
separatorStyle
=
.
none
tableView
.
delegate
=
self
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
dataSource
=
self
tableView
.
backgroundColor
=
.
white
tableView
.
backgroundColor
=
.
clear
tableView
.
backgroundView
=
emptyDataTipsView
tableView
.
register
(
UITableViewCell
.
self
,
forCellReuseIdentifier
:
"UITableViewCell"
)
tableView
.
register
(
UITableViewCell
.
self
,
forCellReuseIdentifier
:
"UITableViewCell"
)
tableView
.
register
(
YHGalaxyNewsCell
.
self
,
forCellReuseIdentifier
:
YHGalaxyNewsCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHGalaxyNewsCell
.
self
,
forCellReuseIdentifier
:
YHGalaxyNewsCell
.
cellReuseIdentifier
)
return
tableView
return
tableView
}()
}()
lazy
var
emptyDataTipsView
:
YHEmptyDataView
=
{
let
view
=
YHEmptyDataView
.
createView
(
"暂无消息"
,
kEmptyMessageBgName
)
let
topMargin
=
310
-
k_Height_NavigationtBarAndStatuBar
view
.
topMargin
=
topMargin
view
.
isHidden
=
true
return
view
}()
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
gk_navTitle
=
"银河资讯"
gk_navTitle
=
"银河资讯"
view
.
backgroundColor
=
.
init
(
hex
:
0xF8F9FB
)
gk_navigationBar
.
backgroundColor
=
.
white
let
rightButtonItem
=
UIBarButtonItem
(
image
:
UIImage
(
named
:
"msg_clean"
)?
.
withRenderingMode
(
.
alwaysOriginal
),
style
:
.
plain
,
target
:
self
,
action
:
#selector(
didCleanBtnClicked
)
)
let
rightButtonItem
=
UIBarButtonItem
(
image
:
UIImage
(
named
:
"msg_clean"
)?
.
withRenderingMode
(
.
alwaysOriginal
),
style
:
.
plain
,
target
:
self
,
action
:
#selector(
didCleanBtnClicked
)
)
gk_navRightBarButtonItem
=
rightButtonItem
gk_navRightBarButtonItem
=
rightButtonItem
gk_navItemRightSpace
=
16
gk_navItemRightSpace
=
16
view
.
backgroundColor
=
.
init
(
hex
:
0xF8F9FB
)
view
.
addSubview
(
tableView
)
view
.
addSubview
(
tableView
)
tableView
.
snp
.
makeConstraints
{
make
in
tableView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
...
@@ -46,6 +59,9 @@ class YHGalaxyNewsListViewController: YHBaseViewController {
...
@@ -46,6 +59,9 @@ class YHGalaxyNewsListViewController: YHBaseViewController {
@objc
func
didCleanBtnClicked
()
{
@objc
func
didCleanBtnClicked
()
{
YHCommonAlertView
.
show
(
"清除未读"
,
"确定要清除所有未读提示吗?"
,
"取消"
,
"确认"
)
{
}
}
}
}
}
...
@@ -73,4 +89,22 @@ extension YHGalaxyNewsListViewController: UITableViewDelegate, UITableViewDataSo
...
@@ -73,4 +89,22 @@ extension YHGalaxyNewsListViewController: UITableViewDelegate, UITableViewDataSo
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
}
}
private
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
CGFloat
{
return
1.0
}
private
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
CGFloat
{
return
1.0
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
return
UIView
()
}
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
return
UIView
()
}
}
}
galaxy/galaxy/Classes/Modules/Message(消息)/C/YHMessageDetailListVC.swift
View file @
623bcb8d
...
@@ -177,7 +177,7 @@ class YHMessageDetailListVC: YHBaseViewController {
...
@@ -177,7 +177,7 @@ class YHMessageDetailListVC: YHBaseViewController {
lazy
var
emptyDataTipsView
:
YHEmptyDataView
=
{
lazy
var
emptyDataTipsView
:
YHEmptyDataView
=
{
let
view
=
YHEmptyDataView
.
createView
(
"暂无消息"
,
kEmptyMessageBgName
)
let
view
=
YHEmptyDataView
.
createView
(
"暂无消息"
,
kEmptyMessageBgName
)
let
topMargin
=
310
-
k_Height_NavigationtBarAndStatuBar
let
topMargin
=
222.0
view
.
topMargin
=
topMargin
view
.
topMargin
=
topMargin
view
.
isHidden
=
true
view
.
isHidden
=
true
return
view
return
view
...
...
galaxy/galaxy/Classes/Modules/Message(消息)/V/YHGalaxyNewsCell.swift
View file @
623bcb8d
...
@@ -31,7 +31,13 @@ class YHGalaxyNewsCell: UITableViewCell {
...
@@ -31,7 +31,13 @@ class YHGalaxyNewsCell: UITableViewCell {
lazy
var
coverImgV
:
UIImageView
=
{
lazy
var
coverImgV
:
UIImageView
=
{
let
imgV
=
UIImageView
()
let
imgV
=
UIImageView
()
imgV
.
backgroundColor
=
.
green
imgV
.
image
=
UIImage
(
named
:
"msg_news_cover_default"
)
return
imgV
}()
lazy
var
playImgV
:
UIImageView
=
{
let
imgV
=
UIImageView
()
imgV
.
image
=
UIImage
(
named
:
"msg_news_video_play"
)
return
imgV
return
imgV
}()
}()
...
@@ -50,7 +56,7 @@ class YHGalaxyNewsCell: UITableViewCell {
...
@@ -50,7 +56,7 @@ class YHGalaxyNewsCell: UITableViewCell {
label
.
textAlignment
=
.
left
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
label
.
numberOfLines
=
0
label
.
numberOfLines
=
0
label
.
text
=
"这是描述
描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述
"
label
.
text
=
"这是描述"
return
label
return
label
}()
}()
...
@@ -74,9 +80,13 @@ class YHGalaxyNewsCell: UITableViewCell {
...
@@ -74,9 +80,13 @@ class YHGalaxyNewsCell: UITableViewCell {
func
setupUI
()
{
func
setupUI
()
{
self
.
selectionStyle
=
.
none
self
.
selectionStyle
=
.
none
self
.
backgroundColor
=
.
clear
contentView
.
backgroundColor
=
.
clear
contentView
.
addSubview
(
timeLabel
)
contentView
.
addSubview
(
timeLabel
)
contentView
.
addSubview
(
whiteContentView
)
contentView
.
addSubview
(
whiteContentView
)
whiteContentView
.
addSubview
(
coverImgV
)
whiteContentView
.
addSubview
(
coverImgV
)
coverImgV
.
addSubview
(
playImgV
)
whiteContentView
.
addSubview
(
titleLabel
)
whiteContentView
.
addSubview
(
titleLabel
)
whiteContentView
.
addSubview
(
descLabel
)
whiteContentView
.
addSubview
(
descLabel
)
whiteContentView
.
addSubview
(
redPointView
)
whiteContentView
.
addSubview
(
redPointView
)
...
@@ -99,6 +109,11 @@ class YHGalaxyNewsCell: UITableViewCell {
...
@@ -99,6 +109,11 @@ class YHGalaxyNewsCell: UITableViewCell {
make
.
height
.
equalTo
(
146
)
make
.
height
.
equalTo
(
146
)
}
}
playImgV
.
snp
.
makeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
42
)
make
.
center
.
equalToSuperview
()
}
titleLabel
.
snp
.
makeConstraints
{
make
in
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
left
.
equalTo
(
16
)
make
.
top
.
equalTo
(
coverImgV
.
snp
.
bottom
)
.
offset
(
16
)
make
.
top
.
equalTo
(
coverImgV
.
snp
.
bottom
)
.
offset
(
16
)
...
@@ -118,9 +133,6 @@ class YHGalaxyNewsCell: UITableViewCell {
...
@@ -118,9 +133,6 @@ class YHGalaxyNewsCell: UITableViewCell {
make
.
height
.
lessThanOrEqualTo
(
34.0
)
make
.
height
.
lessThanOrEqualTo
(
34.0
)
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
4
)
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
4
)
}
}
}
}
...
...
galaxy/galaxy/Res/Assets.xcassets/Message/msg_news_cover_default.imageset/Contents.json
0 → 100644
View file @
623bcb8d
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Group 2033197585@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Group 2033197585@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Message/msg_news_cover_default.imageset/Group 2033197585@2x.png
0 → 100644
View file @
623bcb8d
3.12 KB
galaxy/galaxy/Res/Assets.xcassets/Message/msg_news_cover_default.imageset/Group 2033197585@3x.png
0 → 100644
View file @
623bcb8d
5.16 KB
galaxy/galaxy/Res/Assets.xcassets/Message/msg_news_video_play.imageset/Contents.json
0 → 100644
View file @
623bcb8d
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"点击播放icon@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"点击播放icon@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Message/msg_news_video_play.imageset/点击播放icon@2x.png
0 → 100644
View file @
623bcb8d
1.92 KB
galaxy/galaxy/Res/Assets.xcassets/Message/msg_news_video_play.imageset/点击播放icon@3x.png
0 → 100644
View file @
623bcb8d
2.82 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