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
11c0ebc3
Commit
11c0ebc3
authored
May 13, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决密码框问题
parent
32fb3293
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
YHSmsCodeInputView.swift
...asses/Modules/Login(登录)/V/验证码输入框/YHSmsCodeInputView.swift
+17
-3
No files found.
galaxy/galaxy/Classes/Modules/Login(登录)/V/验证码输入框/YHSmsCodeInputView.swift
View file @
11c0ebc3
...
...
@@ -30,8 +30,8 @@ class YHSmsCodeInputView: UIView {
var
config
:
YHSmsCodeViewConfig
=
YHSmsCodeViewConfig
()
// 此输入框并不显示,只是接收输入
lazy
var
textField
:
UI
TextField
=
{
let
textField
=
UI
TextField
()
lazy
var
textField
:
YH
TextField
=
{
let
textField
=
YH
TextField
()
textField
.
backgroundColor
=
.
clear
textField
.
tintColor
=
.
clear
textField
.
textColor
=
.
clear
...
...
@@ -61,7 +61,6 @@ class YHSmsCodeInputView: UIView {
textField
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalTo
(
self
)
}
// textField.becomeFirstResponder()
// 输入框数量
let
count
=
config
.
count
...
...
@@ -178,4 +177,19 @@ extension YHSmsCodeInputView: UITextFieldDelegate {
let
textLength
=
text
.
charactersArray
.
count
+
string
.
charactersArray
.
count
-
range
.
length
return
textLength
<=
config
.
count
}
}
class
YHTextField
:
UITextField
{
override
func
canPerformAction
(
_
action
:
Selector
,
withSender
sender
:
Any
?)
->
Bool
{
return
false
}
open
override
func
gestureRecognizerShouldBegin
(
_
gestureRecognizer
:
UIGestureRecognizer
)
->
Bool
{
if
let
ges
=
gestureRecognizer
as?
UITapGestureRecognizer
{
return
true
}
else
{
return
false
}
}
}
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