updated picker code
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
7d263c62cb
commit
a7ccec0f98
@ -134,8 +134,15 @@ public class PickerSelectorView<EnumType: RawRepresentable>: UIStackView, Picker
|
||||
}
|
||||
|
||||
private func title(for row: Int) -> String {
|
||||
guard let item = items[row].rawValue as? String else { return "" }
|
||||
return item
|
||||
let item = items[row]
|
||||
|
||||
if let item = item as? CustomStringConvertible {
|
||||
return item.description
|
||||
} else if let raw = item.rawValue as? String {
|
||||
return raw
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user