Hide toolbar above iPhone keyboard, PhoneGap

☆樱花仙子☆ 提交于 2019-12-14 03:45:27

问题


I'm developing a iPhone app using PhoneGap. In the app there is a page contains only one textarea for user's input. As there is no other input field on this page, I want to hide the toolbar above the keyboard to give user more free space. Is there any way to do so? using javascript


回答1:


I don't know whether this is directly possible with phonegap API but you can change this behavior with native code by writing a PhoneGap plugin to do that.

Refer below links for more detail (they are not exact but will give you the required detail):

Programmatically align a toolbar on top of the iPhone keyboard

http://gabriel-tips.blogspot.in/2011/05/input-accessory-view-how-to-add-extra.html




回答2:


you can Hide it by adding this to config.xml:

<preference name="HideKeyboardFormAccessoryBar" value="true"/>

http://docs.phonegap.com/en/3.4.0/config_ref_index.md.html#The%20config.xml%20File




回答3:


Try this cordova plugin https://github.com/don/KeyboardToolbarRemover

Answered on this duplicate thread too Phonegap iOS6: Proper solution to Remove form assistant bar (prev, next, done)




回答4:


There is a way. This guy has done it by making modifications in the AppDelegate.m. You can find description at this link under bonus code section. You can also refer the code for same developed by Kerri Shotts Code Here

Now that the done button is gone i am trying to figure out how to make the keyboard disappear. This will be everybody's next step.



来源:https://stackoverflow.com/questions/9598557/hide-toolbar-above-iphone-keyboard-phonegap

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