改变键盘外观在本机,phonegap / Cordova内置的iOS应用程序 [英] Alter keyboard appearance in native, phonegap/Cordova built iOS App

查看:256
本文介绍了改变键盘外观在本机,phonegap / Cordova内置的iOS应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更改Phonegap / Cordova构建的原生iOS应用程序中显示的所有键盘的背景颜色,如下所示:

I want to change the background color of all the keyboards appearing in my Phonegap/Cordova built native iOS App as shown below:

我已经彻底搜索了这个,当然主要找到2个相关答案。回答者这里说,目标-C代码可以添加到PhoneGap项目的AppDelegate.m文件,如页面。我找到了 AppDelegate.m 文件,但似乎无法找出如何将键盘外观设置为所有文本字段上的UIKeyboardAppearanceAlert。回答者提供的代码示例:

I have googled this thoroughly of course and found mainly 2 relevant answers. The answerer here says that Objective-C code can be added to the PhoneGap project's AppDelegate.m file as shown on this page. I've located the AppDelegate.m file but can't seem to figure out how to set the keyboard appearance to that of UIKeyboardAppearanceAlert on all textfields. Code example provided by the answerer:

 mytextfield.keyboardAppearance = UIKeyboardAppearanceAlert;

根据cordova编写应用程式时,无法区分任何文字字段ID以连接至上述范例。在Xcode / Cordova中有一个文件,其中列出了所有文本字段ID,甚至更好:

Writing an app based on cordova, I can't distinguish any textfield IDs to connect to the above example. Is there a file in Xcode / Cordova in which all the textfield IDs are listed, or even better:

有什么方法可以设置键盘

Is there a way in which I can set the keyboard appearance to dark through UIKeyboardAppearanceAlert or similar approaches, that applies to all textfields and is compatible with Cordova?

感谢

推荐答案

在各种社交媒体上广泛分享这个问题,更广泛和彻底的研究,问朋友和aquaintances等等我只能来到结论,这不能使用phonegap和cordova。我会爱任何人来证明我很长。但是,这是我的结论。

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.

这篇关于改变键盘外观在本机,phonegap / Cordova内置的iOS应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆