Merge branch 'feature/swiftified_textField' of gitlab.verizon.com:BPHV_MIPS/mvm_core_ui into feature/swiftified_textField
This commit is contained in:
commit
871ca090a0
@ -126,5 +126,7 @@ extension DateDropdownEntryField {
|
||||
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||
|
||||
guard let dictionary = json, !dictionary.isEmpty else { return }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -306,10 +306,10 @@ import UIKit
|
||||
|
||||
return enabledTextFields
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Text Field Delegate
|
||||
//--------------------------------------------------
|
||||
}
|
||||
|
||||
// MARK: - TextField Delegate
|
||||
extension DigitEntryField {
|
||||
|
||||
@objc public func textFieldShouldReturn(_ textField: UITextField) -> Bool {
|
||||
|
||||
@ -381,10 +381,6 @@ import UIKit
|
||||
return uiTextFieldDelegate?.textFieldShouldClear?(textField) ?? true
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Passed Along TextField delegate
|
||||
//--------------------------------------------------
|
||||
|
||||
@objc public func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool {
|
||||
|
||||
return uiTextFieldDelegate?.textFieldShouldBeginEditing?(textField) ?? true
|
||||
|
||||
@ -42,10 +42,20 @@ open class ItemDropdownEntryField: DropdownEntryField {
|
||||
// MARK: - Initializer
|
||||
//--------------------------------------------------
|
||||
|
||||
public convenience init() {
|
||||
self.init(frame: .zero)
|
||||
setup()
|
||||
}
|
||||
|
||||
public convenience init(pickerData: [String]) {
|
||||
self.init(frame: .zero)
|
||||
|
||||
self.pickerData = pickerData
|
||||
setup()
|
||||
}
|
||||
|
||||
private func setup() {
|
||||
|
||||
pickerView = MVMCoreUICommonViewsUtility.addPicker(to: textField, delegate: self)
|
||||
textField.hideBlinkingCaret = true
|
||||
uiTextFieldDelegate = self
|
||||
@ -102,6 +112,10 @@ extension ItemDropdownEntryField {
|
||||
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||
|
||||
guard let dictionary = json, !dictionary.isEmpty else { return }
|
||||
|
||||
if let options = dictionary["options"] as? [String] {
|
||||
pickerData = options
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user