Add UIView when keyboard is shown without being dimmed out

流过昼夜 提交于 2019-12-12 03:47:57

问题


This question is a bit difficult to explain. I have a textfield on top (where the navigation bar is usually is) and when I start editing text, the keyboard shows and auto dims the background. I want to add another UIView below the textfield but have that visible and not dimmed out.

Perfect image that describes what I want is this: http://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/Art/keyboard_size.jpg

I want to implement something similar like that google search bar underneath the search url bar. Notice how that is not dimmed out? How can I accomplish this?

Thanks!


回答1:


I think you can use navigation bar prompt for this. Look at the answer here Navigation bar with prompt - replace with image




回答2:


The Google search bar sits above the overlay view (the part that is dimmed). It is relatively easy to build the navigation bar, the textview, the view that you are wanting, and the webview beneath, respectively. If you want the dimmed look for the webview portion, then that too is relatively easy to implement, but I am not certain that is what you are looking for.



来源:https://stackoverflow.com/questions/17603784/add-uiview-when-keyboard-is-shown-without-being-dimmed-out

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