rearranged methods for commenting
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
022355a49f
commit
5ebdbd24f1
@ -113,15 +113,32 @@ open class TextViewEntryField: VDS.TextArea, VDSMoleculeViewProtocol, ObservingT
|
|||||||
}
|
}
|
||||||
|
|
||||||
}.store(in: &subscribers)
|
}.store(in: &subscribers)
|
||||||
|
|
||||||
//String(format: MVMCoreUIUtility.hardcodedString(withKey: "textView_error_message") ?? "", textView.text ?? "", entryFieldModel?.errorMessage ?? "")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
open override func updateView() {
|
||||||
// MARK: - MoleculeViewProtocol
|
super.updateView()
|
||||||
//--------------------------------------------------
|
switch viewModel.type {
|
||||||
open func updateView(_ size: CGFloat) {}
|
case .secure, .password:
|
||||||
|
textView.isSecureTextEntry = true
|
||||||
|
textView.shouldMaskWhileRecording = true
|
||||||
|
|
||||||
|
case .numberSecure:
|
||||||
|
textView.isSecureTextEntry = true
|
||||||
|
textView.keyboardType = .numberPad
|
||||||
|
textView.shouldMaskWhileRecording = true
|
||||||
|
|
||||||
|
case .number:
|
||||||
|
textView.keyboardType = .numberPad
|
||||||
|
|
||||||
|
case .email:
|
||||||
|
textView.keyboardType = .emailAddress
|
||||||
|
//uncomment out once inputField branch is merged and update this logic
|
||||||
|
// case .securityCode, .creditCard:
|
||||||
|
// textView.shouldMaskWhileRecording = true
|
||||||
|
|
||||||
|
default: break
|
||||||
|
}
|
||||||
|
}
|
||||||
open func viewModelDidUpdate() {
|
open func viewModelDidUpdate() {
|
||||||
|
|
||||||
text = viewModel.text
|
text = viewModel.text
|
||||||
@ -148,28 +165,6 @@ open class TextViewEntryField: VDS.TextArea, VDSMoleculeViewProtocol, ObservingT
|
|||||||
textView.textAlignment = viewModel.textAlignment
|
textView.textAlignment = viewModel.textAlignment
|
||||||
textView.placeholder = viewModel.placeholder ?? ""
|
textView.placeholder = viewModel.placeholder ?? ""
|
||||||
|
|
||||||
switch viewModel.type {
|
|
||||||
case .secure, .password:
|
|
||||||
textView.isSecureTextEntry = true
|
|
||||||
textView.shouldMaskWhileRecording = true
|
|
||||||
|
|
||||||
case .numberSecure:
|
|
||||||
textView.isSecureTextEntry = true
|
|
||||||
textView.keyboardType = .numberPad
|
|
||||||
textView.shouldMaskWhileRecording = true
|
|
||||||
|
|
||||||
case .number:
|
|
||||||
textView.keyboardType = .numberPad
|
|
||||||
|
|
||||||
case .email:
|
|
||||||
textView.keyboardType = .emailAddress
|
|
||||||
|
|
||||||
// case .securityCode, .creditCard:
|
|
||||||
// textView.shouldMaskWhileRecording = true
|
|
||||||
|
|
||||||
default: break
|
|
||||||
}
|
|
||||||
|
|
||||||
if (viewModel.selected ?? false) && !viewModel.wasInitiallySelected {
|
if (viewModel.selected ?? false) && !viewModel.wasInitiallySelected {
|
||||||
|
|
||||||
viewModel.wasInitiallySelected = true
|
viewModel.wasInitiallySelected = true
|
||||||
@ -229,6 +224,11 @@ open class TextViewEntryField: VDS.TextArea, VDSMoleculeViewProtocol, ObservingT
|
|||||||
showError = false
|
showError = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - MoleculeViewProtocol
|
||||||
|
//--------------------------------------------------
|
||||||
|
open func updateView(_ size: CGFloat) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal struct ViewMasking {
|
internal struct ViewMasking {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user