Last active
December 15, 2017 14:18
-
-
Save TadeasKriz/a1127e64a04301417cd3b71aa78e485b to your computer and use it in GitHub Desktop.
UIPickerView workaround for white background being set automatically when used as inputView of UITextField with keyboardAppearance set to .Dark.
This file contains hidden or 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
class UIPickerViewWorkaround: UIPickerView { | |
override func respondsToSelector(aSelector: Selector) -> Bool { | |
if aSelector.description == "_appearanceContainer" { | |
return false | |
} else { | |
return super.respondsToSelector(aSelector) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should be:
responds(to aSelector: Selector!)
for new Swift Version