diff --git a/MVMCoreUI/Atoms/Views/DropDown.swift b/MVMCoreUI/Atoms/Views/DropDown.swift index 88d0a2c2..929bd67f 100644 --- a/MVMCoreUI/Atoms/Views/DropDown.swift +++ b/MVMCoreUI/Atoms/Views/DropDown.swift @@ -30,17 +30,17 @@ import UIKit textField.inputView = picker picker.reloadAllComponents() 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 { 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) { - 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 { - return json?.optionalArrayForKey(KeyValue)?.count ?? 0 + return json?.optionalArrayForKey("options")?.count ?? 0 } }