Alter keyboard appearance in native, phonegap/Cordova built iOS App

◇◆丶佛笑我妖孽 提交于 2019-11-30 09:31:09

After sharing this question widely on various social media, more extensive and thorough research, asking friends and aquaintances, etc I can only come to the conclusion that this cannot be done using phonegap and cordova. I would love for anyone to prove me long. For the time being however, this is what I shall conclude.

user1609071

As far as I know you can't do that with Cordova without major hacks, which probably won't be appreciated by Apple. But not sure.

There is no way to apply it to ALL text fields in your app without going through your code and manually setting the style of each uitextfields keyboard to the dark one.

EDIT 2: Unfortunately, it doesn't look like there's any possible way to do this without tapping into the Phonegap framework. And It doesn't look like this is possible without "hacking" into it as mentioned above.

EDIT: There doesn't seem to be any HTML element for the input tag (from Apple's Mobile Safari or Phonegap) that you can set to make the appearance into a alert. So (if possible) do a search for UITextField *.

And right under the line that should look somewhat like this:

UITextField *field = [[UITextField alloc] init...];

Add this line

field.keyboardAppearance = UIKeyboardAppearanceAlert; // just like in your example...

If you do this for all the UITextField results then all your keyboards will look like the picture in your description.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!