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
9ae8f483
Commit
9ae8f483
authored
Apr 17, 2025
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 消息
parent
3bd14846
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
187 additions
and
23 deletions
+187
-23
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+4
-8
YHGalaxyNewsListViewController.swift
...odules/Message(消息)/C/YHGalaxyNewsListViewController.swift
+49
-15
YHMessageListVC.swift
...alaxy/Classes/Modules/Message(消息)/C/YHMessageListVC.swift
+7
-0
YHGalaxyNewsCell.swift
...laxy/Classes/Modules/Message(消息)/V/YHGalaxyNewsCell.swift
+127
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
9ae8f483
...
...
@@ -1268,6 +1268,7 @@
04D8FFB22DA5007A00703C75
/* YHPictureBrowserViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04D8FFB12DA5007A00703C75
/* YHPictureBrowserViewController.swift */
;
};
04D8FFB42DA61DA300703C75
/* YHPlanTestViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04D8FFB32DA61DA200703C75
/* YHPlanTestViewController.swift */
;
};
04D8FFB82DB0D50B00703C75
/* YHGalaxyNewsListViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04D8FFB72DB0D50B00703C75
/* YHGalaxyNewsListViewController.swift */
;
};
04D8FFBA2DB0D95A00703C75
/* YHGalaxyNewsCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04D8FFB92DB0D95A00703C75
/* YHGalaxyNewsCell.swift */
;
};
04E4CF3E2D5C6D32004D4013
/* YHCountryMessageView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04E4CF3D2D5C6D32004D4013
/* YHCountryMessageView.swift */
;
};
04E4CF402D5C83AE004D4013
/* YHSelectPhoneCountryViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04E4CF3F2D5C83AE004D4013
/* YHSelectPhoneCountryViewController.swift */
;
};
04E507D62D6EE856005F758B
/* YHUserLevelAlertView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04E507D52D6EE856005F758B
/* YHUserLevelAlertView.swift */
;
};
...
...
@@ -2578,6 +2579,7 @@
04D8FFB12DA5007A00703C75
/* YHPictureBrowserViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPictureBrowserViewController.swift
;
sourceTree
=
"<group>"
;
};
04D8FFB32DA61DA200703C75
/* YHPlanTestViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHPlanTestViewController.swift
;
sourceTree
=
"<group>"
;
};
04D8FFB72DB0D50B00703C75
/* YHGalaxyNewsListViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGalaxyNewsListViewController.swift
;
sourceTree
=
"<group>"
;
};
04D8FFB92DB0D95A00703C75
/* YHGalaxyNewsCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGalaxyNewsCell.swift
;
sourceTree
=
"<group>"
;
};
04E4CF3D2D5C6D32004D4013
/* YHCountryMessageView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCountryMessageView.swift
;
sourceTree
=
"<group>"
;
};
04E4CF3F2D5C83AE004D4013
/* YHSelectPhoneCountryViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSelectPhoneCountryViewController.swift
;
sourceTree
=
"<group>"
;
};
04E507D52D6EE856005F758B
/* YHUserLevelAlertView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHUserLevelAlertView.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -5793,6 +5795,7 @@
children
=
(
045C0EC82D12CA5E00BD2DC0
/* YHDetailMessageCell.swift */
,
045C0EC92D12CA5E00BD2DC0
/* YHMessageSessionCell.swift */
,
04D8FFB92DB0D95A00703C75
/* YHGalaxyNewsCell.swift */
,
);
path
=
V
;
sourceTree
=
"<group>"
;
...
...
@@ -7111,14 +7114,10 @@
inputFileListPaths
=
(
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks-${CONFIGURATION}-input-files.xcfilelist"
,
);
inputPaths
=
(
);
name
=
"[CP] Embed Pods Frameworks"
;
outputFileListPaths
=
(
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks-${CONFIGURATION}-output-files.xcfilelist"
,
);
outputPaths
=
(
);
runOnlyForDeploymentPostprocessing
=
0
;
shellPath
=
/bin/sh
;
shellScript
=
"\"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks.sh\"\n"
;
...
...
@@ -7132,14 +7131,10 @@
inputFileListPaths
=
(
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources-${CONFIGURATION}-input-files.xcfilelist"
,
);
inputPaths
=
(
);
name
=
"[CP] Copy Pods Resources"
;
outputFileListPaths
=
(
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources-${CONFIGURATION}-output-files.xcfilelist"
,
);
outputPaths
=
(
);
runOnlyForDeploymentPostprocessing
=
0
;
shellPath
=
/bin/sh
;
shellScript
=
"\"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources.sh\"\n"
;
...
...
@@ -8049,6 +8044,7 @@
04D8FF752D978CF000703C75
/* YHPlanLinkShareView.swift in Sources */
,
0411CF062D1A88EA00644D35
/* YHGCDocListCell.swift in Sources */
,
045C128A2D12CA5F00BD2DC0
/* YHAITextInputView.swift in Sources */
,
04D8FFBA2DB0D95A00703C75
/* YHGalaxyNewsCell.swift in Sources */
,
045C128B2D12CA5F00BD2DC0
/* YHWorkExpDataModel.swift in Sources */
,
045C128C2D12CA5F00BD2DC0
/* YHSearchInfoBar.swift in Sources */
,
045C128D2D12CA5F00BD2DC0
/* YHHomeBannerCollectionViewCell.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Message(消息)/C/YHGalaxyNewsListViewController.swift
View file @
9ae8f483
...
...
@@ -10,34 +10,68 @@ import UIKit
class
YHGalaxyNewsListViewController
:
YHBaseViewController
{
// lazy var tableView: UITableView = {
// let tableView = UITableView(frame: .zero, style: .grouped)
// tableView.estimatedSectionHeaderHeight = 1.0
// tableView.estimatedSectionFooterHeight = 1.0
// tableView.showsVerticalScrollIndicator = false
// tableView.separatorStyle = .none
// tableView.delegate = self
// tableView.dataSource = self
// tableView.backgroundColor = .white
// tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
// tableView.register(YHMessageSessionCell.self, forCellReuseIdentifier: YHMessageSessionCell.cellReuseIdentifier)
// return tableView
// }()
var
newsArr
:
[
String
]
=
[
""
,
""
,
""
]
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
tableView
.
estimatedSectionHeaderHeight
=
1.0
tableView
.
estimatedSectionFooterHeight
=
1.0
tableView
.
showsVerticalScrollIndicator
=
false
tableView
.
separatorStyle
=
.
none
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
backgroundColor
=
.
white
tableView
.
register
(
UITableViewCell
.
self
,
forCellReuseIdentifier
:
"UITableViewCell"
)
tableView
.
register
(
YHGalaxyNewsCell
.
self
,
forCellReuseIdentifier
:
YHGalaxyNewsCell
.
cellReuseIdentifier
)
return
tableView
}()
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
gk_navTitle
=
"银河资讯"
view
.
backgroundColor
=
.
init
(
hex
:
0xF8F9FB
)
let
rightButtonItem
=
UIBarButtonItem
(
image
:
UIImage
(
named
:
"msg_clean"
),
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_navItemRightSpace
=
16
view
.
addSubview
(
tableView
)
tableView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalToSuperview
()
.
offset
(
k_Height_NavigationtBarAndStatuBar
)
make
.
bottom
.
equalToSuperview
()
}
}
@objc
func
didCleanBtnClicked
()
{
}
}
extension
YHGalaxyNewsListViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
newsArr
.
count
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
guard
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHGalaxyNewsCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHGalaxyNewsCell
else
{
return
UITableViewCell
()
}
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
newsArr
.
count
{
let
item
=
newsArr
[
indexPath
.
row
]
}
return
cell
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
UITableView
.
automaticDimension
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
}
}
galaxy/galaxy/Classes/Modules/Message(消息)/C/YHMessageListVC.swift
View file @
9ae8f483
...
...
@@ -436,6 +436,13 @@ extension YHMessageListVC: UITableViewDelegate, UITableViewDataSource {
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
do
{
// test
let
vc
=
YHGalaxyNewsListViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
return
}
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
msgArr
.
count
{
...
...
galaxy/galaxy/Classes/Modules/Message(消息)/V/YHGalaxyNewsCell.swift
0 → 100644
View file @
9ae8f483
//
// YHGalaxyNewsCell.swift
// galaxy
//
// Created by Dufet on 2025/4/17.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHGalaxyNewsCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHGalaxyNewsCell"
lazy
var
timeLabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
mainTextColor30
label
.
textAlignment
=
.
center
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
label
.
text
=
"00:00"
return
label
}()
lazy
var
whiteContentView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
6.0
view
.
clipsToBounds
=
true
return
view
}()
lazy
var
coverImgV
:
UIImageView
=
{
let
imgV
=
UIImageView
()
imgV
.
backgroundColor
=
.
green
return
imgV
}()
lazy
var
titleLabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
mainTextColor
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
15
)
label
.
text
=
"这是标题"
return
label
}()
lazy
var
descLabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
init
(
hex
:
0x8993A2
)
label
.
textAlignment
=
.
left
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
label
.
numberOfLines
=
0
label
.
text
=
"这是描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述"
return
label
}()
lazy
var
redPointView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
failColor
view
.
layer
.
cornerRadius
=
4.0
view
.
clipsToBounds
=
true
return
view
}()
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
}
override
init
(
style
:
UITableViewCell
.
CellStyle
,
reuseIdentifier
:
String
?)
{
super
.
init
(
style
:
style
,
reuseIdentifier
:
reuseIdentifier
)
setupUI
()
}
func
setupUI
()
{
self
.
selectionStyle
=
.
none
contentView
.
addSubview
(
timeLabel
)
contentView
.
addSubview
(
whiteContentView
)
whiteContentView
.
addSubview
(
coverImgV
)
whiteContentView
.
addSubview
(
titleLabel
)
whiteContentView
.
addSubview
(
descLabel
)
whiteContentView
.
addSubview
(
redPointView
)
timeLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
16
)
make
.
height
.
equalTo
(
17
)
}
whiteContentView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
top
.
equalTo
(
timeLabel
.
snp
.
bottom
)
.
offset
(
12
)
make
.
bottom
.
equalTo
(
0
)
}
coverImgV
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
height
.
equalTo
(
146
)
}
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
top
.
equalTo
(
coverImgV
.
snp
.
bottom
)
.
offset
(
16
)
make
.
height
.
equalTo
(
21
)
}
redPointView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
titleLabel
.
snp
.
right
)
.
offset
(
6
)
make
.
right
.
lessThanOrEqualTo
(
-
6
)
make
.
width
.
height
.
equalTo
(
8.0
)
make
.
centerY
.
equalTo
(
titleLabel
)
}
descLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
bottom
.
equalTo
(
-
16
)
make
.
height
.
lessThanOrEqualTo
(
34.0
)
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
4
)
}
}
}
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