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
ce498ca3
Commit
ce498ca3
authored
Jun 27, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 发送好友申请
parent
a8b27872
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
YHFriendRequestView.swift
...Classes/Modules/Community(社区)/V/YHFriendRequestView.swift
+10
-1
No files found.
galaxy/galaxy/Classes/Modules/Community(社区)/V/YHFriendRequestView.swift
View file @
ce498ca3
...
@@ -27,6 +27,13 @@ class YHFriendRequestView: UIView {
...
@@ -27,6 +27,13 @@ class YHFriendRequestView: UIView {
}
}
}
}
var
isSendBtnEnabled
=
false
{
didSet
{
self
.
sendBtn
.
backgroundColor
=
(
isSendBtnEnabled
?
UIColor
.
brandMainColor
:
UIColor
.
brandMainColor30
)
self
.
sendBtn
.
isUserInteractionEnabled
=
isSendBtnEnabled
}
}
// 底层蒙版
// 底层蒙版
lazy
var
blackMaskView
:
UIView
=
{
lazy
var
blackMaskView
:
UIView
=
{
let
view
=
UIView
()
let
view
=
UIView
()
...
@@ -167,7 +174,7 @@ class YHFriendRequestView: UIView {
...
@@ -167,7 +174,7 @@ class YHFriendRequestView: UIView {
}
}
// 去除两端的空格
// 去除两端的空格
if
var
text
=
self
.
textView
.
text
{
if
var
text
=
self
.
textView
.
text
{
text
=
text
.
trimmingCharacters
(
in
:
.
whitespaces
)
text
=
text
.
getRealString
(
)
if
text
.
isEmpty
{
if
text
.
isEmpty
{
YHHUD
.
flash
(
message
:
"请输入发送申请信息"
)
YHHUD
.
flash
(
message
:
"请输入发送申请信息"
)
return
return
...
@@ -209,6 +216,7 @@ class YHFriendRequestView: UIView {
...
@@ -209,6 +216,7 @@ class YHFriendRequestView: UIView {
cardView
.
addSubview
(
cancelBtn
)
cardView
.
addSubview
(
cancelBtn
)
cardView
.
addSubview
(
sendBtn
)
cardView
.
addSubview
(
sendBtn
)
self
.
isSendBtnEnabled
=
false
blackMaskView
.
snp
.
makeConstraints
{
make
in
blackMaskView
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
make
.
edges
.
equalToSuperview
()
...
@@ -311,6 +319,7 @@ extension YHFriendRequestView: UITextViewDelegate {
...
@@ -311,6 +319,7 @@ extension YHFriendRequestView: UITextViewDelegate {
func
textViewDidChange
(
_
textView
:
UITextView
)
{
func
textViewDidChange
(
_
textView
:
UITextView
)
{
self
.
textCountLabel
.
text
=
"
\(
textView
.
text
.
count
)
/
\(
self
.
textMaxCount
)
"
self
.
textCountLabel
.
text
=
"
\(
textView
.
text
.
count
)
/
\(
self
.
textMaxCount
)
"
self
.
placeHolderLabel
.
isHidden
=
!
textView
.
text
.
isEmpty
self
.
placeHolderLabel
.
isHidden
=
!
textView
.
text
.
isEmpty
self
.
isSendBtnEnabled
=
!
textView
.
text
.
isYHEmpty
()
}
}
func
textView
(
_
textView
:
UITextView
,
shouldChangeTextIn
range
:
NSRange
,
replacementText
text
:
String
)
->
Bool
{
func
textView
(
_
textView
:
UITextView
,
shouldChangeTextIn
range
:
NSRange
,
replacementText
text
:
String
)
->
Bool
{
...
...
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