Add UIView when keyboard is shown without being di

2019-09-12 03:58发布

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

enter image description here 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!

2条回答
别忘想泡老子
2楼-- · 2019-09-12 04:02

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

查看更多
男人必须洒脱
3楼-- · 2019-09-12 04:17

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.

查看更多
登录 后发表回答