skywinder / ActionSheetPicker-3.0

Quickly reproduce the dropdown UIPickerView / ActionSheet functionality on iOS.
http://skywinder.github.io/ActionSheetPicker-3.0
BSD 3-Clause "New" or "Revised" License
3.4k stars 740 forks source link

How to downcast values from Any to String? #331

Closed lukejones1 closed 4 years ago

lukejones1 commented 7 years ago
 print("values = \(values)")

will return the values from the selected index. Although, how to i turn the value into a string?

I've tried

self.profession = String(describing: values)

and

    self.profession = values as? String?
phoney commented 7 years ago

Not sure why you post this question in this github repo.

You don't say what values is. You might try values.description() for debugging purposes.