Created
November 13, 2017 21:35
-
-
Save ericjames/4e07915ef20c5c3514a91aaef09bc3d5 to your computer and use it in GitHub Desktop.
Swift 4 - UIPickerView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func numberOfComponents(in pickerView: UIPickerView) -> Int { | |
return 1 | |
} | |
func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { | |
return pickerDataSource.count; | |
} | |
func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { | |
return pickerDataSource[row] | |
} | |
func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) | |
{ | |
self.uuid.text = pickerDataSource[row] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment