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
82461af4
Commit
82461af4
authored
Oct 12, 2025
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发布动态调整
parent
024fd1e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
YHCirclePublishViewController.swift
...ty(社区)/Circle(下属社区)/C/YHCirclePublishViewController.swift
+4
-2
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/Circle(下属社区)/C/YHCirclePublishViewController.swift
View file @
82461af4
...
...
@@ -300,14 +300,16 @@ class YHCirclePublishViewController: YHBaseViewController {
// 动态更新 TextView 高度
private
func
updateTextViewHeight
(
_
textView
:
UITextView
)
{
let
size
=
textView
.
sizeThatFits
(
CGSize
(
width
:
textView
.
frame
.
width
,
height
:
.
infinity
))
let
width
=
textView
.
frame
.
width
>
0
?
textView
.
frame
.
width
:
UIScreen
.
main
.
bounds
.
width
-
marginX
*
2
let
size
=
textView
.
sizeThatFits
(
CGSize
(
width
:
width
,
height
:
.
infinity
))
// 设置最小和最大高度限制
let
minHeight
:
CGFloat
=
textView
==
self
.
textView
?
24
:
92
let
maxHeight
:
CGFloat
=
textView
==
self
.
textView
?
100
:
CGFloat
.
infinity
let
newHeight
=
min
(
max
(
size
.
height
,
minHeight
),
maxHeight
)
if
abs
(
newHeight
-
textView
.
frame
.
size
.
height
)
>
1
{
let
currentHeight
=
textView
.
frame
.
size
.
height
if
abs
(
newHeight
-
currentHeight
)
>
1
||
currentHeight
==
0
{
textView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
newHeight
)
}
...
...
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