key change
This commit is contained in:
parent
63556707bc
commit
ee773eed89
@ -30,17 +30,17 @@ import UIKit
|
|||||||
textField.inputView = picker
|
textField.inputView = picker
|
||||||
picker.reloadAllComponents()
|
picker.reloadAllComponents()
|
||||||
MVMCoreUICommonViewsUtility.addDismissToolbar(textField, delegate: delegateObject?.uiTextFieldDelegate)
|
MVMCoreUICommonViewsUtility.addDismissToolbar(textField, delegate: delegateObject?.uiTextFieldDelegate)
|
||||||
textField.text = json?.stringWithChainOfKeysOrIndexes([KeyValue,picker.selectedRow(inComponent: 0)])
|
textField.text = json?.stringWithChainOfKeysOrIndexes(["options",picker.selectedRow(inComponent: 0)])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension DropDown: UIPickerViewDelegate {
|
extension DropDown: UIPickerViewDelegate {
|
||||||
public func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
|
public func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
|
||||||
return json?.stringWithChainOfKeysOrIndexes([KeyValue,row])
|
return json?.stringWithChainOfKeysOrIndexes(["options",row])
|
||||||
}
|
}
|
||||||
|
|
||||||
public func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
|
public func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
|
||||||
textField?.text = json?.stringWithChainOfKeysOrIndexes([KeyValue,row])
|
textField?.text = json?.stringWithChainOfKeysOrIndexes(["options",row])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,6 +50,6 @@ extension DropDown: UIPickerViewDataSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
|
public func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
|
||||||
return json?.optionalArrayForKey(KeyValue)?.count ?? 0
|
return json?.optionalArrayForKey("options")?.count ?? 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user