A simple UITextField extension that creates a single-component UIPickerView as input.
_1. Copy and paste CSPickerTextField.h, CSPickerTextField.m, and CSPickerTextFieldDelegate.h from the CSPickerTextField folder into your project.
For Swift, add these in the bridging-header too:
_2. Create a UITextField in storyboard and make its class CSPickerTextField.
_3. Make your view controller conforms to CSPickerTextFieldDelegate, set your_text_field.pickerDelegate = self, and implements the delegate methods.
There you go, happy coding!