Changing inputView background color from blurry gray to anything else

Viewed 1993

I am trying to change inputView background color from the default grayish to something else however I do not see any solution to that.

I have UIPickerView that opens when user touches the textField and it is bottom like keyboard as inputView. I am achieving it like this: myTextField.inputView = myPickerView.

Since I am using it inside inputView, I think I actually have to change it's backgroud color but do not know how.

It looks like this:

enter image description here

Now I want to change the background color of it.

I've already tried:

  1. myPickerView.setValue(0.8, forKey: "alpha")
  2. myPckerView.backgroundColor = UIColor.blue
  3. self.inputView.backgroundColor = UIColor.blue
  4. and pretty much every solution from SO

And this is the output(has some nasty blurry layer over it):

enter image description here

Do I have to create some kind of custom keyboard just for that or is there a workaround or Apple tells again what you can do and what not like robot?

2 Answers
Related