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
cbdb367a
Commit
cbdb367a
authored
Apr 09, 2025
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 方案
parent
8fb95ac6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
YHPlanTestViewController.swift
...Classes/Modules/Plan(方案)/C/YHPlanTestViewController.swift
+9
-3
No files found.
galaxy/galaxy/Classes/Modules/Plan(方案)/C/YHPlanTestViewController.swift
View file @
cbdb367a
...
...
@@ -370,7 +370,7 @@ class YHPlanTestViewController: YHBaseViewController {
self
.
tableView
.
reloadData
()
UIView
.
performWithoutAnimation
{
self
.
tableView
.
scrollToRow
(
at
:
IndexPath
(
row
:
NSNotFound
,
section
:
self
.
infoArr
.
count
-
1
),
at
:
.
top
,
animated
:
false
)
self
.
tableView
.
scrollToRow
(
at
:
IndexPath
(
row
:
0
,
section
:
self
.
infoArr
.
count
-
2
),
at
:
.
bottom
,
animated
:
false
)
self
.
tableView
.
setContentOffset
(
.
zero
,
animated
:
false
)
}
}
...
...
@@ -471,6 +471,11 @@ extension YHPlanTestViewController: UITableViewDelegate, UITableViewDataSource {
return
1.0
}
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
()
return
view
}
// 计算文字宽度大小
func
getHeigt
(
font
:
UIFont
,
width
:
CGFloat
,
string
:
String
)
->
CGFloat
{
let
size
=
CGSize
.
init
(
width
:
width
,
height
:
CGFloat
(
MAXFLOAT
))
...
...
@@ -568,8 +573,9 @@ extension YHPlanTestViewController: JXSegmentedViewDelegate {
func
segmentedView
(
_
segmentedView
:
JXSegmentedView
,
didSelectedItemAt
index
:
Int
)
{
let
index
=
segmentedView
.
selectedIndex
let
rect
=
self
.
tableView
.
rectForRow
(
at
:
IndexPath
(
row
:
0
,
section
:
index
))
self
.
tableView
.
setContentOffset
(
CGPoint
(
x
:
0
,
y
:
rect
.
origin
.
y
-
44.0
+
2.0
),
animated
:
true
)
let
rect
=
self
.
tableView
.
rectForHeader
(
inSection
:
index
)
let
gap
=
index
>
0
?
8.0
:
0.0
self
.
tableView
.
setContentOffset
(
CGPoint
(
x
:
0
,
y
:
rect
.
origin
.
y
-
44.0
-
gap
),
animated
:
true
)
if
segmentedView
==
segmented1View
{
self
.
segmented2View
.
defaultSelectedIndex
=
index
...
...
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