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
2a998c1b
Commit
2a998c1b
authored
Feb 05, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
0927cee8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
2 deletions
+56
-2
YHBasicInfoFillView.swift
...ess(流程)/BaseInformation(基本资料)/V/YHBasicInfoFillView.swift
+56
-2
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/BaseInformation(基本资料)/V/YHBasicInfoFillView.swift
View file @
2a998c1b
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
import
UIKit
import
UIKit
class
YHBasicInfoFillView
:
UIView
{
class
YHBasicInfoFillView
:
UIView
,
UITextViewDelegate
{
override
init
(
frame
:
CGRect
)
{
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
super
.
init
(
frame
:
frame
)
...
@@ -103,7 +103,7 @@ class YHBasicInfoFillView: UIView {
...
@@ -103,7 +103,7 @@ class YHBasicInfoFillView: UIView {
]
]
let
questionAttrStr
=
NSMutableAttributedString
(
string
:
str
,
attributes
:
attributes
)
let
questionAttrStr
=
NSMutableAttributedString
(
string
:
str
,
attributes
:
attributes
)
let
starRange
=
NSRange
(
location
:
0
,
length
:
1
)
let
starRange
=
NSRange
(
location
:
0
,
length
:
1
)
questionAttrStr
.
addAttribute
(
NSAttributedString
.
Key
.
foregroundColor
,
value
:
UIColor
(
hex
:
0xFF3A3A
)
,
range
:
starRange
)
questionAttrStr
.
addAttribute
(
NSAttributedString
.
Key
.
foregroundColor
,
value
:
UIColor
.
failColor
,
range
:
starRange
)
titleLabel
.
attributedText
=
questionAttrStr
titleLabel
.
attributedText
=
questionAttrStr
}
}
}
}
...
@@ -116,6 +116,10 @@ class YHBasicInfoFillView: UIView {
...
@@ -116,6 +116,10 @@ class YHBasicInfoFillView: UIView {
updateUI
()
updateUI
()
}
}
}
}
private
var
lastSelectedBtn
:
UIButton
?
private
var
myTextView
:
UITextView
!
}
}
...
@@ -153,10 +157,40 @@ private extension YHBasicInfoFillView {
...
@@ -153,10 +157,40 @@ private extension YHBasicInfoFillView {
}
}
addSubview
(
additionHoldView
)
addSubview
(
additionHoldView
)
additionHoldView
.
isHidden
=
true
additionHoldView
.
isHidden
=
true
let
redStar
=
UILabel
()
redStar
.
text
=
"*"
redStar
.
textColor
=
UIColor
.
failColor
additionHoldView
.
addSubview
(
redStar
)
redStar
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
12
)
make
.
top
.
equalTo
(
19
)
make
.
width
.
height
.
equalTo
(
6
)
}
let
textView
:
UITextView
=
UITextView
()
additionHoldView
.
addSubview
(
textView
)
textView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
redStar
.
snp
.
top
)
.
offset
(
-
7
)
make
.
left
.
equalTo
(
redStar
.
snp
.
right
)
.
offset
(
2
)
make
.
right
.
equalTo
(
12
)
make
.
height
.
lessThanOrEqualTo
(
66
)
}
myTextView
=
textView
myTextView
.
delegate
=
self
}
}
@objc
func
didClickResponseBtn
(
btn
:
UIButton
)
{
@objc
func
didClickResponseBtn
(
btn
:
UIButton
)
{
printLog
(
"点击了按钮哈
\(
btn
.
tag
)
"
)
printLog
(
"点击了按钮哈
\(
btn
.
tag
)
"
)
if
lastSelectedBtn
==
btn
{
printLog
(
"连续点击了同一个按钮......"
)
return
}
lastSelectedBtn
=
btn
btn
.
isSelected
=
true
btn
.
isSelected
=
true
updateAnswerButton
(
btn
,
true
)
updateAnswerButton
(
btn
,
true
)
...
@@ -224,3 +258,23 @@ private extension YHBasicInfoFillView {
...
@@ -224,3 +258,23 @@ private extension YHBasicInfoFillView {
}
}
}
}
}
}
extension
YHBasicInfoFillView
:
UITextFieldDelegate
{
private
func
textViewDidBeginEditing
(
textView
:
UITextView
)
{
// if myTextView.textColor == ph_TextColor && myTextView.isFirstResponder() {
// myTextView.text = nil
// myTextView.textColor = .white
// }
}
private
func
textViewDidEndEditing
(
textView
:
UITextView
)
{
// if myTxtView.text.isEmpty || myTxtView.text == "" {
// myTxtView.textColor = .lightGray
// myTxtView.text = "Type your thoughts here..."
// }
}
}
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