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
adf6f1bf
Commit
adf6f1bf
authored
Mar 23, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 搜索按钮
parent
0bcb18c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
YHCertificateSearchViewController.swift
...tificates(我的证书)/C/YHCertificateSearchViewController.swift
+7
-1
YHCertificateSearchBar.swift
...服务中心)/MyCertificates(我的证书)/V/YHCertificateSearchBar.swift
+12
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/C/YHCertificateSearchViewController.swift
View file @
adf6f1bf
...
@@ -58,7 +58,13 @@ class YHCertificateSearchViewController: YHBaseViewController {
...
@@ -58,7 +58,13 @@ class YHCertificateSearchViewController: YHBaseViewController {
[
weak
self
]
text
in
[
weak
self
]
text
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
requestList
(
keyWord
:
text
)
requestList
(
keyWord
:
text
)
}
bar
.
textChange
=
{
[
weak
self
]
text
in
guard
let
self
=
self
else
{
return
}
if
isEmptyString
(
text
)
{
requestList
(
keyWord
:
""
)
}
}
}
return
bar
return
bar
}()
}()
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateSearchBar.swift
View file @
adf6f1bf
...
@@ -73,10 +73,16 @@ class YHCertificateSearchBar: UIView {
...
@@ -73,10 +73,16 @@ class YHCertificateSearchBar: UIView {
}
}
}
}
func
setSearchButtonEnable
(
_
enable
:
Bool
)
{
searchBtn
.
isUserInteractionEnabled
=
enable
searchBtn
.
alpha
=
(
enable
?
1.0
:
0.5
)
}
func
createUI
()
{
func
createUI
()
{
self
.
backgroundColor
=
.
white
self
.
backgroundColor
=
.
white
setSearchButtonEnable
(
false
)
contentView
.
addSubview
(
textField
)
contentView
.
addSubview
(
textField
)
contentView
.
addSubview
(
searchBtn
)
contentView
.
addSubview
(
searchBtn
)
self
.
addSubview
(
contentView
)
self
.
addSubview
(
contentView
)
...
@@ -99,6 +105,11 @@ class YHCertificateSearchBar: UIView {
...
@@ -99,6 +105,11 @@ class YHCertificateSearchBar: UIView {
}
}
@objc
func
textFieldChanged
(
textField
:
UITextField
)
{
@objc
func
textFieldChanged
(
textField
:
UITextField
)
{
if
isEmptyString
(
textField
.
text
)
{
setSearchButtonEnable
(
false
)
}
else
{
setSearchButtonEnable
(
true
)
}
if
let
textChange
=
textChange
{
if
let
textChange
=
textChange
{
textChange
(
textField
.
text
)
textChange
(
textField
.
text
)
}
}
...
...
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