Skip to content

Instantly share code, notes, and snippets.

@TadeasKriz
Last active October 13, 2016 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TadeasKriz/f85ac7e82defadcaadc3db3c151b2fc4 to your computer and use it in GitHub Desktop.
Save TadeasKriz/f85ac7e82defadcaadc3db3c151b2fc4 to your computer and use it in GitHub Desktop.

Simply add the following line after the view has been instantiated and set to .inputView. (It might be added elsewhere, but has to be run before the picker is shown)

UIPickerView.appearanceWhenContainedInInstancesOfClasses([UIView.self]).backgroundColor = UIColor.clearColor()

This line combined with textInput.keyboardAppearance = .Dark and returing attributed titles from UIPickerViewDelegate's implementation that have white font will give you a dark UIPickerView which is nice if you have other UITextFields with dark keyboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment