The example project to go along with my tutorial on using a UIPickerView as the entry method for a UITextField using Swift 4. I have updated the code to work with Swift 4 and Xcode 9 along with the tutorial code samples and text.
You can find the tutorial here https://peterwitham.com/swift/how-to-use-a-uipickerview-as-input-for-a-uitextfield/