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
b386d389
Commit
b386d389
authored
Dec 11, 2024
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播ui问题修复
parent
1bdabf3b
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
156 additions
and
38 deletions
+156
-38
YHLiveStateViewController.swift
...s/LivestreamSales(直播销售)/C/YHLiveStateViewController.swift
+2
-2
YHVODPlayerViewController.swift
...s/LivestreamSales(直播销售)/C/YHVODPlayerViewController.swift
+17
-2
YHFloatingWindow.swift
...es/Modules/LivestreamSales(直播销售)/V/YHFloatingWindow.swift
+71
-8
YHLiveMessageCell.swift
...s/Modules/LivestreamSales(直播销售)/V/YHLiveMessageCell.swift
+1
-1
YHLiveShopView.swift
...sses/Modules/LivestreamSales(直播销售)/V/YHLiveShopView.swift
+36
-18
YHPlayerTopBarView.swift
.../Modules/LivestreamSales(直播销售)/V/YHPlayerTopBarView.swift
+1
-1
YHVideoProgressControl.swift
...ules/LivestreamSales(直播销售)/V/YHVideoProgressControl.swift
+6
-6
Contents.json
...cassets/YinHeLive/live_center_play.imageset/Contents.json
+22
-0
live_center_play@2x.png
...nHeLive/live_center_play.imageset/live_center_play@2x.png
+0
-0
live_center_play@3x.png
...nHeLive/live_center_play.imageset/live_center_play@3x.png
+0
-0
live_room_zoom@2x.png
...s/YinHeLive/live_room_zoom.imageset/live_room_zoom@2x.png
+0
-0
live_room_zoom@3x.png
...s/YinHeLive/live_room_zoom.imageset/live_room_zoom@3x.png
+0
-0
No files found.
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/C/YHLiveStateViewController.swift
View file @
b386d389
...
@@ -71,13 +71,13 @@ class YHLiveStateViewController: YHBaseViewController {
...
@@ -71,13 +71,13 @@ class YHLiveStateViewController: YHBaseViewController {
make
.
edges
.
equalToSuperview
()
make
.
edges
.
equalToSuperview
()
}
}
blurEffect
=
{
blurEffect
=
{
return
UIBlurEffect
(
style
:
.
dark
)
return
UIBlurEffect
(
style
:
.
light
)
}()
}()
blurView
=
{
blurView
=
{
let
view
=
UIVisualEffectView
(
effect
:
blurEffect
)
let
view
=
UIVisualEffectView
(
effect
:
blurEffect
)
view
.
frame
=
view
.
bounds
view
.
frame
=
view
.
bounds
view
.
alpha
=
0.
5
view
.
alpha
=
0.
6
return
view
return
view
}()
}()
view
.
addSubview
(
blurView
)
view
.
addSubview
(
blurView
)
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/C/YHVODPlayerViewController.swift
View file @
b386d389
...
@@ -27,6 +27,12 @@ class YHVODPlayerViewController: YHBasePlayerViewController {
...
@@ -27,6 +27,12 @@ class YHVODPlayerViewController: YHBasePlayerViewController {
return
imageView
return
imageView
}()
}()
private
lazy
var
centerPlayIcon
:
UIImageView
=
{
let
imageView
=
UIImageView
(
image
:
UIImage
(
named
:
"live_center_play"
))
imageView
.
isHidden
=
true
return
imageView
}()
private
var
isFirstAppear
=
true
private
var
isFirstAppear
=
true
// MARK: - Initialization
// MARK: - Initialization
...
@@ -71,6 +77,7 @@ class YHVODPlayerViewController: YHBasePlayerViewController {
...
@@ -71,6 +77,7 @@ class YHVODPlayerViewController: YHBasePlayerViewController {
player
?
.
resume
()
player
?
.
resume
()
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.25
,
execute
:
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.25
,
execute
:
{
self
.
progressControl
.
setPlaying
(
self
.
player
?
.
getPlayState
()
==
.
playing
)
self
.
progressControl
.
setPlaying
(
self
.
player
?
.
getPlayState
()
==
.
playing
)
self
.
centerPlayIcon
.
isHidden
=
self
.
player
?
.
getPlayState
()
==
.
playing
})
})
}
}
}
else
{
}
else
{
...
@@ -101,12 +108,16 @@ class YHVODPlayerViewController: YHBasePlayerViewController {
...
@@ -101,12 +108,16 @@ class YHVODPlayerViewController: YHBasePlayerViewController {
bottomImageView
.
snp
.
makeConstraints
{
make
in
bottomImageView
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
make
.
edges
.
equalToSuperview
()
}
}
containerView
.
addSubview
(
progressControl
)
containerView
.
addSubview
(
progressControl
)
containerView
.
addSubview
(
centerPlayIcon
)
progressControl
.
snp
.
makeConstraints
{
make
in
progressControl
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
view
.
safeAreaLayoutGuide
.
snp
.
bottom
)
.
offset
(
-
102
)
make
.
top
.
equalTo
(
view
.
safeAreaLayoutGuide
.
snp
.
bottom
)
.
offset
(
-
102
)
}
}
centerPlayIcon
.
snp
.
makeConstraints
{
make
in
make
.
centerY
.
centerX
.
equalToSuperview
()
make
.
height
.
width
.
equalTo
(
62
)
}
topBarView
.
closeButtonClickEvent
=
{
[
weak
self
]
in
topBarView
.
closeButtonClickEvent
=
{
[
weak
self
]
in
self
?
.
closeLive
()
self
?
.
closeLive
()
...
@@ -123,6 +134,7 @@ class YHVODPlayerViewController: YHBasePlayerViewController {
...
@@ -123,6 +134,7 @@ class YHVODPlayerViewController: YHBasePlayerViewController {
let
needHideZoom
=
true
//playbackInfo?.needHideZoomButton == true
let
needHideZoom
=
true
//playbackInfo?.needHideZoomButton == true
topBarView
.
hideZoomButton
(
needHideZoom
)
topBarView
.
hideZoomButton
(
needHideZoom
)
progressControl
.
setPlaying
(
player
?
.
getPlayState
()
==
.
playing
)
progressControl
.
setPlaying
(
player
?
.
getPlayState
()
==
.
playing
)
centerPlayIcon
.
isHidden
=
player
?
.
getPlayState
()
==
.
playing
}
}
private
func
setupGestures
()
{
private
func
setupGestures
()
{
...
@@ -344,11 +356,14 @@ extension YHVODPlayerViewController: YHPlayerDelegate {
...
@@ -344,11 +356,14 @@ extension YHVODPlayerViewController: YHPlayerDelegate {
case
.
playing
:
case
.
playing
:
self
.
progressControl
.
setPlaying
(
true
)
self
.
progressControl
.
setPlaying
(
true
)
printLog
(
"####$$$.playing:
\(
player
.
getDuration
()
)
"
)
printLog
(
"####$$$.playing:
\(
player
.
getDuration
()
)
"
)
self
.
centerPlayIcon
.
isHidden
=
true
case
.
paused
,
.
stopped
:
case
.
paused
,
.
stopped
:
printLog
(
"####$$$.paused, .stopped"
)
printLog
(
"####$$$.paused, .stopped"
)
self
.
progressControl
.
setPlaying
(
false
)
self
.
progressControl
.
setPlaying
(
false
)
self
.
centerPlayIcon
.
isHidden
=
false
case
.
failed
:
case
.
failed
:
self
.
showAlert
(
message
:
"播放失败,错误原因:
\(
reason
.
rawValue
)
"
)
//self.showAlert(message: "播放失败,错误原因:\(reason.rawValue)")
self
.
centerPlayIcon
.
isHidden
=
false
default
:
default
:
break
break
}
}
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/V/YHFloatingWindow.swift
View file @
b386d389
...
@@ -492,6 +492,49 @@ class YHFloatingWindow: NSObject {
...
@@ -492,6 +492,49 @@ class YHFloatingWindow: NSObject {
return
CGSize
(
width
:
width
,
height
:
height
)
return
CGSize
(
width
:
width
,
height
:
height
)
}
}
// private func adjustedPosition(for center: CGPoint) -> CGPoint {
// guard let superview = containerView.superview else { return center }
//
// var adjustedCenter = center
// let halfWidth = containerView.bounds.width / 2
// let halfHeight = containerView.bounds.height / 2
//
// let safeAreaInsets: UIEdgeInsets
// if #available(iOS 11.0, *) {
// safeAreaInsets = superview.safeAreaInsets
// } else {
// safeAreaInsets = .zero
// }
//
// let topLimit = safeAreaInsets.top + halfHeight
// let bottomLimit = superview.bounds.height - safeAreaInsets.bottom - halfHeight
//
// adjustedCenter.x = min(max(halfWidth, adjustedCenter.x),
// superview.bounds.width - halfWidth)
// adjustedCenter.y = min(max(topLimit, adjustedCenter.y),
// bottomLimit)
//
// return adjustedCenter
// }
//
// private func handlePanEndedWithVelocity(_ velocity: CGPoint) {
// let magnitude = sqrt((velocity.x * velocity.x) + (velocity.y * velocity.y))
// let slideMultiplier = magnitude / 200
// let slideFactor = 0.1 * slideMultiplier
//
// var finalCenter = CGPoint(
// x: containerView.center.x + (velocity.x * slideFactor),
// y: containerView.center.y + (velocity.y * slideFactor)
// )
//
// finalCenter = adjustedPosition(for: finalCenter)
//
// UIView.animate(withDuration: 0.3) {
// self.containerView.center = finalCenter
// self.delegate?.floatingWindow(self, didChangePosition: finalCenter)
// }
// }
private
func
adjustedPosition
(
for
center
:
CGPoint
)
->
CGPoint
{
private
func
adjustedPosition
(
for
center
:
CGPoint
)
->
CGPoint
{
guard
let
superview
=
containerView
.
superview
else
{
return
center
}
guard
let
superview
=
containerView
.
superview
else
{
return
center
}
...
@@ -506,13 +549,20 @@ class YHFloatingWindow: NSObject {
...
@@ -506,13 +549,20 @@ class YHFloatingWindow: NSObject {
safeAreaInsets
=
.
zero
safeAreaInsets
=
.
zero
}
}
let
topLimit
=
safeAreaInsets
.
top
+
halfHeight
// 设置固定的边距
let
bottomLimit
=
superview
.
bounds
.
height
-
safeAreaInsets
.
bottom
-
halfHeight
let
topMargin
:
CGFloat
=
86
// 距离顶部statusbar 86
let
bottomMargin
:
CGFloat
=
86
// 距离底部安全区域 86
let
horizontalMargin
:
CGFloat
=
20
// 左右边距 20
// 计算活动范围的限制
let
topLimit
=
max
(
safeAreaInsets
.
top
+
topMargin
,
halfHeight
)
let
bottomLimit
=
superview
.
bounds
.
height
-
max
(
safeAreaInsets
.
bottom
+
bottomMargin
,
halfHeight
)
let
leftLimit
=
horizontalMargin
+
halfWidth
let
rightLimit
=
superview
.
bounds
.
width
-
horizontalMargin
-
halfWidth
adjustedCenter
.
x
=
min
(
max
(
halfWidth
,
adjustedCenter
.
x
),
// 应用限制
superview
.
bounds
.
width
-
halfWidth
)
adjustedCenter
.
x
=
min
(
max
(
leftLimit
,
adjustedCenter
.
x
),
rightLimit
)
adjustedCenter
.
y
=
min
(
max
(
topLimit
,
adjustedCenter
.
y
),
adjustedCenter
.
y
=
min
(
max
(
topLimit
,
adjustedCenter
.
y
),
bottomLimit
)
bottomLimit
)
return
adjustedCenter
return
adjustedCenter
}
}
...
@@ -529,9 +579,22 @@ class YHFloatingWindow: NSObject {
...
@@ -529,9 +579,22 @@ class YHFloatingWindow: NSObject {
finalCenter
=
adjustedPosition
(
for
:
finalCenter
)
finalCenter
=
adjustedPosition
(
for
:
finalCenter
)
// 确定最终吸附位置(左右两侧)
guard
let
superview
=
containerView
.
superview
else
{
return
}
let
horizontalMargin
:
CGFloat
=
20
let
shouldMoveToRight
=
finalCenter
.
x
>
superview
.
bounds
.
width
/
2
// 计算吸附后的 x 坐标
let
finalX
=
shouldMoveToRight
?
(
superview
.
bounds
.
width
-
horizontalMargin
-
containerView
.
bounds
.
width
/
2
)
:
(
horizontalMargin
+
containerView
.
bounds
.
width
/
2
)
// 保持 y 坐标不变,但确保在限制范围内
let
finalY
=
finalCenter
.
y
UIView
.
animate
(
withDuration
:
0.3
)
{
UIView
.
animate
(
withDuration
:
0.3
)
{
self
.
containerView
.
center
=
finalCenter
self
.
containerView
.
center
=
CGPoint
(
x
:
finalX
,
y
:
finalY
)
self
.
delegate
?
.
floatingWindow
(
self
,
didChangePosition
:
finalCenter
)
self
.
delegate
?
.
floatingWindow
(
self
,
didChangePosition
:
CGPoint
(
x
:
finalX
,
y
:
finalY
)
)
}
}
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/V/YHLiveMessageCell.swift
View file @
b386d389
...
@@ -70,7 +70,7 @@ class YHLiveMessageCell: UITableViewCell {
...
@@ -70,7 +70,7 @@ class YHLiveMessageCell: UITableViewCell {
func
configureTipsMessage
(
_
tips
:
String
)
{
func
configureTipsMessage
(
_
tips
:
String
)
{
let
tipsIcon
=
ASAttributedString
.
init
(
.
image
(
UIImage
(
named
:
"live_msg_tips_icon"
)
??
UIImage
(),
.
custom
(
.
offset
(
CGPoint
(
x
:
0
,
y
:
-
4.0
)),
size
:
.
init
(
width
:
32
,
height
:
18
))))
let
tipsIcon
=
ASAttributedString
.
init
(
.
image
(
UIImage
(
named
:
"live_msg_tips_icon"
)
??
UIImage
(),
.
custom
(
.
offset
(
CGPoint
(
x
:
0
,
y
:
-
4.0
)),
size
:
.
init
(
width
:
32
,
height
:
18
))))
let
contentAtt
=
(
tipsIcon
+
ASAttributedString
(
string
:
tips
,
.
foreground
(
UIColor
.
white
),
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
13
))))
let
contentAtt
=
(
tipsIcon
+
ASAttributedString
(
string
:
"
\(
tips
)
"
,
.
foreground
(
UIColor
.
white
),
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
13
))))
contentLabel
.
attributed
.
text
=
contentAtt
contentLabel
.
attributed
.
text
=
contentAtt
}
}
}
}
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/V/YHLiveShopView.swift
View file @
b386d389
...
@@ -17,7 +17,7 @@ class YHLiveShopView: UIView {
...
@@ -17,7 +17,7 @@ class YHLiveShopView: UIView {
var
titleLabel
:
UILabel
!
var
titleLabel
:
UILabel
!
var
subTitleLabel
:
UILabel
!
var
subTitleLabel
:
UILabel
!
var
closeButton
:
UIButton
!
var
closeButton
:
UIButton
!
var
lineView
:
UIView
!
//
var lineView: UIView!
var
tableView
:
UITableView
!
var
tableView
:
UITableView
!
var
dataSource
:
[
YHLiveGoodsItem
]
=
[]
{
var
dataSource
:
[
YHLiveGoodsItem
]
=
[]
{
didSet
{
didSet
{
...
@@ -33,7 +33,7 @@ class YHLiveShopView: UIView {
...
@@ -33,7 +33,7 @@ class YHLiveShopView: UIView {
override
init
(
frame
:
CGRect
)
{
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
super
.
init
(
frame
:
frame
)
backgroundColor
=
UIColor
(
white
:
0.5
,
alpha
:
0.1
)
//
backgroundColor = UIColor(white: 0.5, alpha: 0.1)
let
tap
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
handleTap
)
)
let
tap
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
handleTap
)
)
tap
.
delegate
=
self
tap
.
delegate
=
self
addGestureRecognizer
(
tap
)
addGestureRecognizer
(
tap
)
...
@@ -53,8 +53,9 @@ class YHLiveShopView: UIView {
...
@@ -53,8 +53,9 @@ class YHLiveShopView: UIView {
}()
}()
addSubview
(
centerView
)
addSubview
(
centerView
)
centerView
.
snp
.
makeConstraints
{
make
in
centerView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
295
)
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
height
.
equalTo
(
518
)
//
make.height.equalTo(518)
}
}
let
headImageView
=
{
let
headImageView
=
{
...
@@ -99,18 +100,18 @@ class YHLiveShopView: UIView {
...
@@ -99,18 +100,18 @@ class YHLiveShopView: UIView {
make
.
top
.
equalTo
(
16
)
make
.
top
.
equalTo
(
16
)
}
}
lineView
=
{
//
lineView = {
let
view
=
UIView
()
//
let view = UIView()
view
.
backgroundColor
=
UIColor
.
separatorColor
//
view.backgroundColor = UIColor.separatorColor
return
view
//
return view
}()
//
}()
centerView
.
addSubview
(
lineView
)
//
centerView.addSubview(lineView)
lineView
.
snp
.
makeConstraints
{
make
in
//
lineView.snp.makeConstraints { make in
make
.
left
.
equalTo
(
18
)
//
make.left.equalTo(18)
make
.
top
.
equalTo
(
52
)
//
make.top.equalTo(52)
make
.
height
.
equalTo
(
1
)
//
make.height.equalTo(1)
make
.
right
.
equalTo
(
-
18
)
//
make.right.equalTo(-18)
}
//
}
tableView
=
{
tableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
...
@@ -223,6 +224,7 @@ class YHLiveShopViewCell: UITableViewCell {
...
@@ -223,6 +224,7 @@ class YHLiveShopViewCell: UITableViewCell {
var
subPriceLabel
:
UILabel
!
var
subPriceLabel
:
UILabel
!
var
flagLabel
:
UILabel
!
var
flagLabel
:
UILabel
!
var
buyButton
:
UIButton
!
var
buyButton
:
UIButton
!
var
lineView
:
UIView
!
//var addButton: UIButton!
//var addButton: UIButton!
// var addEvent: (() -> Void)?
// var addEvent: (() -> Void)?
...
@@ -238,9 +240,9 @@ class YHLiveShopViewCell: UITableViewCell {
...
@@ -238,9 +240,9 @@ class YHLiveShopViewCell: UITableViewCell {
titleLabel
.
text
=
dataSource
.
name
titleLabel
.
text
=
dataSource
.
name
messageLabel
.
text
=
dataSource
.
description
messageLabel
.
text
=
dataSource
.
description
let
a
:
ASAttributedString
=
.
init
(
"¥"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
a
:
ASAttributedString
=
.
init
(
"¥"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
b
:
ASAttributedString
=
.
init
(
"
\(
dataSource
.
linePrice
)
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
20
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
b
:
ASAttributedString
=
.
init
(
"
\(
dataSource
.
linePrice
)
"
,
.
font
(
UIFont
(
name
:
"DINAlternate-Bold"
,
size
:
20
)
??
UIFont
.
PFSC_R
(
ofSize
:
20
)),
.
foreground
(
UIColor
.
mainTextColor
))
priceLabel
.
attributed
.
text
=
a
+
b
priceLabel
.
attributed
.
text
=
a
+
b
let
c
:
ASAttributedString
=
.
init
(
"
\(
dataSource
.
price
)
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
(
hex
:
0x8993a2
)),
.
strikethrough
(
.
single
))
let
c
:
ASAttributedString
=
.
init
(
"
¥
\(
dataSource
.
price
)
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
(
hex
:
0x8993a2
)),
.
strikethrough
(
.
single
))
subPriceLabel
.
attributed
.
text
=
c
subPriceLabel
.
attributed
.
text
=
c
flagLabel
.
text
=
"
\(
dataSource
.
flag
)
"
flagLabel
.
text
=
"
\(
dataSource
.
flag
)
"
subPriceLabel
.
isHidden
=
dataSource
.
linePrice
==
dataSource
.
price
subPriceLabel
.
isHidden
=
dataSource
.
linePrice
==
dataSource
.
price
...
@@ -268,7 +270,21 @@ class YHLiveShopViewCell: UITableViewCell {
...
@@ -268,7 +270,21 @@ class YHLiveShopViewCell: UITableViewCell {
}
}
func
setupUI
()
{
func
setupUI
()
{
self
.
backgroundColor
=
.
white
//self.backgroundColor = .white
lineView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
separatorColor
return
view
}()
contentView
.
addSubview
(
lineView
)
lineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
0
)
make
.
height
.
equalTo
(
0.5
)
make
.
right
.
equalTo
(
-
18
)
}
centerImageView
=
{
centerImageView
=
{
let
imageView
=
UIImageView
()
let
imageView
=
UIImageView
()
imageView
.
image
=
UIImage
(
named
:
"global_default_image"
)
imageView
.
image
=
UIImage
(
named
:
"global_default_image"
)
...
@@ -360,6 +376,8 @@ class YHLiveShopViewCell: UITableViewCell {
...
@@ -360,6 +376,8 @@ class YHLiveShopViewCell: UITableViewCell {
button
.
setTitle
(
"去抢购"
,
for
:
.
normal
)
button
.
setTitle
(
"去抢购"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
.
white
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
.
white
,
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
buy
)
,
for
:
.
touchUpInside
)
button
.
addTarget
(
self
,
action
:
#selector(
buy
)
,
for
:
.
touchUpInside
)
button
.
layer
.
cornerRadius
=
2
button
.
clipsToBounds
=
true
return
button
return
button
}()
}()
contentView
.
addSubview
(
buyButton
)
contentView
.
addSubview
(
buyButton
)
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/V/YHPlayerTopBarView.swift
View file @
b386d389
...
@@ -43,7 +43,7 @@ class YHPlayerTopBarView: UIView {
...
@@ -43,7 +43,7 @@ class YHPlayerTopBarView: UIView {
let
label
=
UILabel
()
let
label
=
UILabel
()
label
.
text
=
"-"
label
.
text
=
"-"
label
.
textColor
=
.
white
.
withAlphaComponent
(
0.7
)
label
.
textColor
=
.
white
.
withAlphaComponent
(
0.7
)
label
.
font
=
.
PFSC_R
(
ofSize
:
1
0
)
label
.
font
=
.
PFSC_R
(
ofSize
:
1
2
)
return
label
return
label
}()
}()
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/V/YHVideoProgressControl.swift
View file @
b386d389
...
@@ -48,7 +48,7 @@ class YHVideoProgressControl: UIView {
...
@@ -48,7 +48,7 @@ class YHVideoProgressControl: UIView {
private
lazy
var
currentTimeLabel
:
UILabel
=
{
private
lazy
var
currentTimeLabel
:
UILabel
=
{
let
label
=
UILabel
()
let
label
=
UILabel
()
label
.
textColor
=
.
white
label
.
textColor
=
.
white
label
.
font
=
.
PFSC_
R
(
ofSize
:
12
)
label
.
font
=
.
PFSC_
M
(
ofSize
:
12
)
return
label
return
label
}()
}()
...
@@ -140,7 +140,7 @@ class YHVideoProgressControl: UIView {
...
@@ -140,7 +140,7 @@ class YHVideoProgressControl: UIView {
segmentCollection
.
snp
.
makeConstraints
{
make
in
segmentCollection
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
16
)
make
.
top
.
equalToSuperview
()
.
offset
(
16
)
make
.
left
.
equalToSuperview
()
.
offset
(
16
)
make
.
left
.
equalToSuperview
()
.
offset
(
16
)
make
.
height
.
equalTo
(
2
0
)
make
.
height
.
equalTo
(
2
2
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
4
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
4
)
}
}
progressSlider
.
snp
.
makeConstraints
{
make
in
progressSlider
.
snp
.
makeConstraints
{
make
in
...
@@ -306,9 +306,9 @@ extension YHVideoProgressControl: UICollectionViewDataSource, UICollectionViewDe
...
@@ -306,9 +306,9 @@ extension YHVideoProgressControl: UICollectionViewDataSource, UICollectionViewDe
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
sizeForItemAt
indexPath
:
IndexPath
)
->
CGSize
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
sizeForItemAt
indexPath
:
IndexPath
)
->
CGSize
{
let
text
=
segments
[
indexPath
.
item
]
let
text
=
segments
[
indexPath
.
item
]
let
attr
=
NSAttributedString
(
string
:
text
,
attributes
:
[
.
font
:
UIFont
.
systemFont
(
ofSize
:
8
)])
let
attr
=
NSAttributedString
(
string
:
text
,
attributes
:
[
.
font
:
UIFont
.
systemFont
(
ofSize
:
10
)])
let
width
=
attr
.
yh_width
(
containerHeight
:
2
0
)
+
8
let
width
=
attr
.
yh_width
(
containerHeight
:
2
2
)
+
8
return
CGSize
(
width
:
width
,
height
:
2
0
)
return
CGSize
(
width
:
width
,
height
:
2
2
)
}
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
...
@@ -324,7 +324,7 @@ class SegmentCell: UICollectionViewCell {
...
@@ -324,7 +324,7 @@ class SegmentCell: UICollectionViewCell {
private
let
titleLabel
:
UILabel
=
{
private
let
titleLabel
:
UILabel
=
{
let
label
=
UILabel
()
let
label
=
UILabel
()
label
.
textColor
=
.
white
label
.
textColor
=
.
white
label
.
font
=
.
systemFont
(
ofSize
:
8
)
label
.
font
=
.
systemFont
(
ofSize
:
10
)
label
.
textAlignment
=
.
center
label
.
textAlignment
=
.
center
return
label
return
label
}()
}()
...
...
galaxy/galaxy/Res/Assets.xcassets/YinHeLive/live_center_play.imageset/Contents.json
0 → 100644
View file @
b386d389
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"live_center_play@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"live_center_play@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/YinHeLive/live_center_play.imageset/live_center_play@2x.png
0 → 100644
View file @
b386d389
1.01 KB
galaxy/galaxy/Res/Assets.xcassets/YinHeLive/live_center_play.imageset/live_center_play@3x.png
0 → 100644
View file @
b386d389
1.43 KB
galaxy/galaxy/Res/Assets.xcassets/YinHeLive/live_room_zoom.imageset/live_room_zoom@2x.png
View replaced file @
1bdabf3b
View file @
b386d389
338 Bytes
|
W:
|
H:
387 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
galaxy/galaxy/Res/Assets.xcassets/YinHeLive/live_room_zoom.imageset/live_room_zoom@3x.png
View replaced file @
1bdabf3b
View file @
b386d389
413 Bytes
|
W:
|
H:
488 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
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