在 iphone sdk 中输入时,以蓝色突出显示键盘中的搜索按钮
当用户在搜索框中输入文本时,如何使键盘中的搜索按钮为蓝色背景。在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在界面生成器中打开 xib 文件,然后单击属性检查器(command-1)。然后更改此设置:
现在我重新阅读您的问题,也许您在问如何以编程方式实现该搜索功能……是这样吗?
编辑:好的,如果您想以编程方式执行此操作,那么您需要实现 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:
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.