在 iphone sdk 中输入时,以蓝色突出显示键盘中的搜索按钮

发布于 2024-10-04 18:08:37 字数 122 浏览 0 评论 0原文

当用户在搜索框中输入文本时,如何使键盘中的搜索按钮为蓝色背景。在 iPhone 中,用于搜索功能的键盘中的搜索按钮变为蓝色。如何实现这个功能。我认为这是可能的,但我不知道......请帮助我。

谢谢你, 马丹·莫汉

How to make the search button in the key board as blue back ground when a user enter the text into the search box.In iphone for search functionality search button in the key board is becoming blue. How to implement this functionality. I think it is possible to do but i don't know... Please help me.

Thank you,
Madan mohan

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情释 2024-10-11 18:08:37

在界面生成器中打开 xib 文件,然后单击属性检查器(command-1)。然后更改此设置:

alt text

现在我重新阅读您的问题,也许您在问如何以编程方式实现该搜索功能……是这样吗?

编辑:好的,如果您想以编程方式执行此操作,那么您需要实现 UITextInputTraits。查看此文档: http:// developer.apple.com/library/ios/#documentation/uikit/reference/UITextInputTraits_Protocol/Reference/UITextInputTraits.html

我认为这将是我提供的屏幕截图的直接副本。

Open your xib file in interface builder, then click on your attribute inspector (command-1). Then change this setting:

alt text

Now that I re-read your question maybe you were asking how to implement that search functionality programatically... Is that the case?

EDIT: Ok, if you want to do it programatically then you need to implement UITextInputTraits. Check this documentation out: http://developer.apple.com/library/ios/#documentation/uikit/reference/UITextInputTraits_Protocol/Reference/UITextInputTraits.html

I think it's going to be a straight-forward copy from the screenshot that I provided.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文