显示键盘而不变暗时添加 UIView [英] Add UIView when keyboard is shown without being dimmed out

查看:29
本文介绍了显示键盘而不变暗时添加 UIView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题有点难解释.我在顶部有一个文本字段(通常是导航栏所在的位置),当我开始编辑文本时,键盘会显示并自动使背景变暗.我想在文本字段下方添加另一个 UIView,但使其可见且未变暗.

描述我想要的完美图像是这样的:http://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/Art/keyboard_size.jpg

我想在搜索 url 栏下方实现类似谷歌搜索栏的东西.请注意它是如何变暗的?我怎样才能做到这一点?

谢谢!

解决方案

Google 搜索栏位于叠加视图(变暗的部分)上方.分别构建导航栏、文本视图、您想要的视图和下面的 web 视图相对容易.如果您想要 webview 部分的灰色外观,那么实现起来也相对容易,但我不确定这就是您要寻找的.

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!

解决方案

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.

这篇关于显示键盘而不变暗时添加 UIView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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