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
ad55cca8
Commit
ad55cca8
authored
May 10, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'youhua-dev' of
http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS
into youhua-dev
parents
89811c29
9f7ce875
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
YHHomeKingKongBlockItem.swift
.../Classes/Modules/Home(首页)/V/YHHomeKingKongBlockItem.swift
+2
-2
YHHomeKingKongBlockView.swift
.../Classes/Modules/Home(首页)/V/YHHomeKingKongBlockView.swift
+4
-9
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeKingKongBlockItem.swift
View file @
ad55cca8
...
...
@@ -28,7 +28,7 @@ class YHHomeKingKongBlockItem: UIView {
let
label
=
UILabel
()
label
.
text
=
"去香港"
label
.
textColor
=
UIColor
(
hex
:
0x94A3B8
,
alpha
:
1.0
)
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
1
3
)
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
1
2
)
label
.
lineBreakMode
=
.
byTruncatingMiddle
label
.
textAlignment
=
.
center
return
label
...
...
@@ -57,7 +57,7 @@ private extension YHHomeKingKongBlockItem {
make
.
centerX
.
equalToSuperview
()
make
.
left
.
equalTo
(
4
)
make
.
right
.
equalTo
(
-
4
)
make
.
height
.
equalTo
(
1
8
)
make
.
height
.
equalTo
(
1
7
)
make
.
bottom
.
equalTo
(
-
8
)
}
}
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeKingKongBlockView.swift
View file @
ad55cca8
...
...
@@ -9,9 +9,7 @@
import
UIKit
class
YHHomeKingKongBlockView
:
UIView
{
static
let
viewH
:
CGFloat
=
(
KScreenWidth
-
20
*
2
-
16
*
3
)
/
4.0
static
let
viewH
:
CGFloat
=
71.0
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
initView
()
...
...
@@ -31,8 +29,8 @@ class YHHomeKingKongBlockView: UIView {
private
extension
YHHomeKingKongBlockView
{
func
initView
()
{
let
gap
:
CGFloat
=
16
.0
var
offsetX
:
CGFloat
=
0
.0
let
itemGap
:
CGFloat
=
(
KScreenWidth
-
16.0
*
2
-
YHHomeKingKongBlockView
.
viewH
*
4
)
/
3
.0
var
offsetX
:
CGFloat
=
0
for
(
index
,
item
)
in
arrData
.
enumerated
()
{
let
view
=
YHHomeKingKongBlockItem
()
view
.
dataModel
=
item
...
...
@@ -42,11 +40,8 @@ private extension YHHomeKingKongBlockView {
make
.
left
.
equalTo
(
offsetX
)
make
.
width
.
height
.
equalTo
(
YHHomeKingKongBlockView
.
viewH
)
}
offsetX
=
offsetX
+
YHHomeKingKongBlockView
.
viewH
+
gap
offsetX
=
offsetX
+
YHHomeKingKongBlockView
.
viewH
+
itemGap
view
.
tag
=
index
let
tap
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
tapView(gestureRecognizer:)
)
)
view
.
addGestureRecognizer
(
tap
)
}
...
...
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