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
0adb1fa0
Commit
0adb1fa0
authored
Dec 17, 2024
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI走查问题修复
parent
4a2a200b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
60 deletions
+22
-60
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+0
-4
YHFadeView.swift
.../Classes/Modules/LivestreamSales(直播销售)/V/YHFadeView.swift
+0
-42
YHLiveMessageListView.swift
...dules/LivestreamSales(直播销售)/V/YHLiveMessageListView.swift
+21
-13
YHLiveShopView.swift
...sses/Modules/LivestreamSales(直播销售)/V/YHLiveShopView.swift
+1
-1
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
0adb1fa0
...
...
@@ -315,7 +315,6 @@
04564D5F2CF565C7004456E4
/* YHInputBottomBar.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04564D5E2CF565C7004456E4
/* YHInputBottomBar.swift */
;
};
04564D612CF59835004456E4
/* YHMessageInputViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04564D602CF59835004456E4
/* YHMessageInputViewController.swift */
;
};
04564D632CF60222004456E4
/* YHGradientView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04564D622CF60222004456E4
/* YHGradientView.swift */
;
};
04564D652CF6065D004456E4
/* YHFadeView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04564D642CF6065D004456E4
/* YHFadeView.swift */
;
};
04564D682CF6BFA0004456E4
/* YHLiveSalesViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04564D672CF6BFA0004456E4
/* YHLiveSalesViewModel.swift */
;
};
04564D6A2CF6C0FC004456E4
/* YHLiveDetailModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04564D692CF6C0FC004456E4
/* YHLiveDetailModel.swift */
;
};
04564D6C2CF6C414004456E4
/* YHLivePlayerViewController+Api.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04564D6B2CF6C414004456E4
/* YHLivePlayerViewController+Api.swift */
;
};
...
...
@@ -1434,7 +1433,6 @@
04564D5E2CF565C7004456E4
/* YHInputBottomBar.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHInputBottomBar.swift
;
sourceTree
=
"<group>"
;
};
04564D602CF59835004456E4
/* YHMessageInputViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMessageInputViewController.swift
;
sourceTree
=
"<group>"
;
};
04564D622CF60222004456E4
/* YHGradientView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGradientView.swift
;
sourceTree
=
"<group>"
;
};
04564D642CF6065D004456E4
/* YHFadeView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHFadeView.swift
;
sourceTree
=
"<group>"
;
};
04564D672CF6BFA0004456E4
/* YHLiveSalesViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLiveSalesViewModel.swift
;
sourceTree
=
"<group>"
;
};
04564D692CF6C0FC004456E4
/* YHLiveDetailModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLiveDetailModel.swift
;
sourceTree
=
"<group>"
;
};
04564D6B2CF6C414004456E4
/* YHLivePlayerViewController+Api.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"YHLivePlayerViewController+Api.swift"
;
sourceTree
=
"<group>"
;
};
...
...
@@ -3093,7 +3091,6 @@
04564D4C2CF38D16004456E4
/* YHLiveMessageCell.swift */
,
04564D4E2CF38E20004456E4
/* YHLiveMessageListView.swift */
,
04564D622CF60222004456E4
/* YHGradientView.swift */
,
04564D642CF6065D004456E4
/* YHFadeView.swift */
,
04564D552CF4467B004456E4
/* YHPlayerTopBarView.swift */
,
04564D5E2CF565C7004456E4
/* YHInputBottomBar.swift */
,
04564D7D2CF8D03D004456E4
/* YHFloatingWindow.swift */
,
...
...
@@ -6681,7 +6678,6 @@
042B20DA2CEB337100655093
/* YHImproveSchemeTemplateListCell.swift in Sources */
,
0445E6AF2BE9CFF6003C52F9
/* YHAppVersionForceUpdateView.swift in Sources */
,
040AE9882CEB6DAC00310241
/* YHWorkExperiencePositionModel.swift in Sources */
,
04564D652CF6065D004456E4
/* YHFadeView.swift in Sources */
,
04213B272C48C95E00797900
/* YHHomeIdentityCell.swift in Sources */
,
041892262C91BDF500B9FB94
/* YHResignDocumentHeaderCell.swift in Sources */
,
04564D802CF8E16C004456E4
/* YHPlayerTransitionAnimator.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/V/YHFadeView.swift
deleted
100644 → 0
View file @
4a2a200b
//
// YHFadeView.swift
// galaxy
//
// Created by alexzzw on 2024/11/26.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHFadeView
:
UIView
{
private
let
maskLayer
=
CAGradientLayer
()
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
setupMask
()
}
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
setupMask
()
}
private
func
setupMask
()
{
// 使用黑色渐变作为mask
maskLayer
.
colors
=
[
UIColor
.
black
.
cgColor
,
UIColor
.
clear
.
cgColor
,
]
maskLayer
.
startPoint
=
CGPoint
(
x
:
0
,
y
:
0
)
maskLayer
.
endPoint
=
CGPoint
(
x
:
0
,
y
:
1
)
// 重要:将渐变层设置为mask
layer
.
mask
=
maskLayer
}
override
func
layoutSubviews
()
{
super
.
layoutSubviews
()
// 确保mask大小与视图相同
maskLayer
.
frame
=
bounds
}
}
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/V/YHLiveMessageListView.swift
View file @
0adb1fa0
...
...
@@ -15,13 +15,6 @@ class YHLiveMessageListView: UIView {
// MARK: - UI Components
private
lazy
var
topFadeView
:
YHFadeView
=
{
let
view
=
YHFadeView
()
view
.
isHidden
=
true
view
.
backgroundColor
=
.
clear
.
withAlphaComponent
(
0.1
)
return
view
}()
private
lazy
var
tableView
:
UITableView
=
{
let
view
=
UITableView
()
view
.
backgroundColor
=
.
clear
...
...
@@ -49,12 +42,6 @@ class YHLiveMessageListView: UIView {
private
func
setupUI
()
{
backgroundColor
=
.
clear
addSubview
(
tableView
)
addSubview
(
topFadeView
)
bringSubviewToFront
(
topFadeView
)
topFadeView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
26
)
}
tableView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
...
...
@@ -81,6 +68,27 @@ class YHLiveMessageListView: UIView {
// MARK: - UITableViewDelegate & UITableViewDataSource
extension
YHLiveMessageListView
:
UITableViewDelegate
,
UITableViewDataSource
{
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
let
fadeRange
:
CGFloat
=
50
tableView
.
visibleCells
.
forEach
{
cell
in
guard
let
indexPath
=
tableView
.
indexPath
(
for
:
cell
)
else
{
return
}
let
cellRect
=
tableView
.
rectForRow
(
at
:
indexPath
)
// 因为视图是倒置的,所以我们需要用 tableView 的高度来计算正确的位置
let
cellPositionFromBottom
=
tableView
.
bounds
.
height
-
(
cellRect
.
origin
.
y
-
scrollView
.
contentOffset
.
y
)
-
cellRect
.
height
if
cellPositionFromBottom
>=
0
&&
cellPositionFromBottom
<=
fadeRange
{
let
progress
=
cellPositionFromBottom
/
fadeRange
cell
.
alpha
=
progress
}
else
if
cellPositionFromBottom
>
fadeRange
{
cell
.
alpha
=
1.0
}
else
{
cell
.
alpha
=
0.0
}
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
UITableView
.
automaticDimension
}
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/V/YHLiveShopView.swift
View file @
0adb1fa0
...
...
@@ -283,7 +283,7 @@ class YHLiveShopViewCell: UITableViewCell {
}
func
setupUI
()
{
//self.backgroundColor = .white
self
.
backgroundColor
=
.
clear
lineView
=
{
let
view
=
UIView
()
...
...
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