Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
UIPickerView workaround for white background being set automatically when used as inputView of UITextField with keyboardAppearance set to .Dark.
class UIPickerViewWorkaround: UIPickerView {
override func respondsToSelector(aSelector: Selector) -> Bool {
if aSelector.description == "_appearanceContainer" {
return false
} else {
return super.respondsToSelector(aSelector)
}
}
}
@dungi
Copy link

dungi commented Dec 15, 2017

Should be: responds(to aSelector: Selector!) for new Swift Version

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